Allow use of instanceof without Symbol
This commit is contained in:
parent
30311d121e
commit
8edb208992
@ -181,7 +181,7 @@ export let inherits = template(`
|
||||
|
||||
export let _instanceof = template(`
|
||||
(function (left, right) {
|
||||
if (right != null && right[Symbol.hasInstance]) {
|
||||
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
||||
return right[Symbol.hasInstance](left);
|
||||
} else {
|
||||
return left instanceof right;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user