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

Expecting a function in instanceof check, but got undefined with .min file #12

Open
timothyallan opened this issue Jan 6, 2016 · 2 comments

Comments

@timothyallan
Copy link

I've just found that I get this only when I use gulp/browserify via npm in production mode. If I do a dev compile, it works fine!

Looks like it's failing on if(!(e instanceof t)) in the .min file, which is

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) in the regular one.

Any suggestions?

edit: It's not just the min file. I've taken the main JS now and am simply importing it. As soon as I add something as simple as this var myImpetus = new Impetus({ source: document.body, update: function(x, y) { // whatever you want to do with the values } });
everything breaks with Uncaught TypeError: Expecting a function in instanceof check, but got 1

I've got 40 other modules loading, and as soon as I remove Impetus, everything compiles!

@timothyallan
Copy link
Author

Many hours later... It's uglify that's doing it, when set to mangle: { sort:true}
All the other options seem to work fine.

Only with Impetus though, which is bizarre.

@chrisbateman
Copy link
Owner

That's odd - I'll see if I can reproduce this and see what's going on...

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

No branches or pull requests

2 participants