paulmillr / es6-shim

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

window.Symbol is undefined in IE 11 #356

Closed clcrutch closed 9 years ago

clcrutch commented 9 years ago

AngularJS2 attempts to call window.Symbol and fails.

I was able to correct the issue with this:

if (typeof(globals.Symbol) === 'undefined') {
    globals.Symbol = Symbol;
}

image

ljharb commented 9 years ago

If Angular 2 depends on Symbols - which are not fully shimmable in any browser that doesn't ship with them - then it simply won't work in a browser that doesn't (like IE 11, and many other versions of browsers).

In no way would it be acceptable for es6-shim to assign an empty object to the global Symbol property just to fix an incompatibility in a random library.