paulmillr / es6-shim

ECMAScript 6 compatibility shims for legacy JS engines
http://paulmillr.com
MIT License
3.11k stars 388 forks source link

Uncaught (in promise) TypeError: object is not a function #407

Closed mcmath closed 8 years ago

mcmath commented 8 years ago

I'm getting this unhelpful error message in Chrome after upgrading to es6-shim@0.34.3.

Uncaught (in promise) TypeError: object is not a function            index.html:1
    at Object.defer (native)
    at chain (native)
    at then (native)

I'm using this as part of an Angular 2 application, bundled with Webpack. When I downgrade to es6-shim@0.34.2 the error goes away. And I'm not getting any errors in Firefox.

ljharb commented 8 years ago

@akim-mcmath I assume you're using Chrome Canary?

This is a trivial console warning that you can absolutely ignore and won't affect your program in any way. That said, it should have been resolved by v0.34.3 (and was present in v0.34.2). If you could somehow narrow it down to a line in es6-shim that would help a lot.

fwiw, I can't reproduce this in Chrome or Chrome Canary with v0.34.3.

mcmath commented 8 years ago

@ljharb Thanks for your reply. I'm using Chrome 48.0.2564 on OSX actually. I also neglected to mention that the program seemed to be working fine otherwise. If it's trivial, then you don't need to worry about it for my sake. However, I seem to have found the source of the warning on line 2562 of v0.34.3.

I don't know why it's not reproducible. Could it be specific to OSX? In any case, I believe I've found a fix, which I can submit if you would like.

ljharb commented 8 years ago

Thanks, merged!

mcmath commented 8 years ago

You're welcome. Thank you for your work on this project and your quick resolution of this issue.

ljharb commented 8 years ago

np! released as v0.34.4.