es-shims / get-own-property-symbols

ES6 Object.getOwnPropertySymbols partial polyfill

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Throwing error when called with a context that is not the global context

JakeChampion opened this issue · comments

The following code should not throw according to the specification but does throw in this polyfill.

Symbol.bind(Array)()

It is likely this section that is not working as expected:

if (this && this !== G) {
throw new TypeError('Symbol is not a constructor');
}