justinfagnani / mixwith.js

A mixin library for ES6

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error if Symbol not defined.

trusktr opened this issue · comments

if (Symbol && Symbol.hasInstance && !mixin[Symbol.hasInstance]) {

Seems that if Symbol is not defined, there will be an error. Maybe it needs to be a typeof Symbol != 'undefined' check.

Oh, and

mixin[Symbol.hasInstance]

will check for Function.prototype[Symbol.hasInstance]. Should that check for an own symbol property instead?