Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doesn't work in strict mode #2

Closed
jywarren opened this issue Sep 15, 2020 · 2 comments · Fixed by #3
Closed

doesn't work in strict mode #2

jywarren opened this issue Sep 15, 2020 · 2 comments · Fixed by #3

Comments

@jywarren
Copy link

We found an issue (publiclab/PublicLab.Editor#614) with the following line when trying to compile this in Babel:

this.Class = function(){};

It yields >> TypeError: Attempted to assign to readonly property. at for this line when running in PhantomJS within a Jasmine test. We're looking for a workaround, just filing this here for reference.

Looks like some refactors/ rewrites available here:

https://stackoverflow.com/questions/15050816/is-john-resigs-javascript-inheritance-snippet-deprecated

Thanks!

@mattinsler
Copy link
Owner

I just published version 2.0.0. There is an API change in this version where you need to import the library like the following.

const { Class } = require('resig-class');

I hope this helps!

@jywarren
Copy link
Author

Oh wow, thank you!!! Amazing, and many thanks for the swift response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants