aurelia / polyfills

The minimal set of polyfills needed to run Aurelia.
MIT License
26 stars 27 forks source link

Cannot read property 'Symbol(toStringTag)' of undefined for #10

Closed Jaans closed 8 years ago

Jaans commented 8 years ago

The new Aurelia polyfills is erroring out when a null or undefined value is passed for the Object.prototype.toString polyfill.

image

I found the source usage that is receiving the above Aurelia error inside the momentjs library where it checks input using the Object.prototype (see screenshot below): image

Let me know if you need more info.

EisenbergEffect commented 8 years ago

We have a fix coming.

NateRedding commented 8 years ago

I got this error as well. I think the core.js library has the same issue also. When I tried importing core-js from main.js, I get the same error message, but a different stacktrace (obviously).

mthomson commented 8 years ago

I rolled back to core-js and this error has gone away. I'm putting the core-js client right into index.html

EisenbergEffect commented 8 years ago

Putting core-js in the index.html is probably the easiest way to ensure that it works correctly. We do have a fix for this particular issue coming shortly.

damianof commented 8 years ago

How can we update our packages references without getting this latest bug? It seems this start from aurelia-bootstrapper which is the one who has a reference to the aurelia-polyfills

EisenbergEffect commented 8 years ago

Fixed. Release coming shortly.

damianof commented 8 years ago

Thank you Rob.

damianof commented 8 years ago

Ok now there is no more errors, but the application no longer renders.

betrayedjinn commented 8 years ago

For me, its working fine now.

damianof commented 8 years ago

paranoxx, did you try cleaning everything, node modules, jspm packages, dist, and start from scratch with npm install, then jspm update then gulp build?

betrayedjinn commented 8 years ago

No, why should i?

Jaans commented 8 years ago

Excellent! Issue fixed. Thank you for the quick turnaround.

damianof commented 8 years ago

paranoxx, you should not, but if you do you'll experience my issue. This might be unrelated to this issue, and I'm currently still trying to figure out which other updates to which other aurelia package is causing this. I only know that my app was working fine until the last 2-3 days.

betrayedjinn commented 8 years ago

Shoudn't you do a jspm install -y after a clean?

damianof commented 8 years ago

paranoxx You should not have too. I usually never do jspm install -y. Let me dig a little more into my config and see what I can find. I' put together a little solution with a subset and I'll post on github public shortly

betrayedjinn commented 8 years ago

I'm not that into the internals of jspm but that's what i do while preparing deployment. Checkout project on destination server, npm install followed by jspm install -y followed by gulp bundle.

damianof commented 8 years ago

paranoxx all seems working again in my sandbox here https://github.com/damianof/aurelia-config-samples

leosbrf commented 8 years ago

Should that fix also cover null values? I'm getting a similar error when null.

Edited: done in commit: https://github.com/aurelia/polyfills/commit/4b705bb1c4886e197d0e8dfcc291fb3308238372