add Symbol existence check to typeof helper - closes #2745
This commit is contained in:
parent
d1d0ed901e
commit
31a6cb9c57
@ -2,7 +2,7 @@ import template from "babel-template";
|
|||||||
|
|
||||||
export let _typeof = template(`
|
export let _typeof = template(`
|
||||||
(function (obj) {
|
(function (obj) {
|
||||||
return obj && obj.constructor === Symbol ? "symbol" : typeof obj;
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
||||||
});
|
});
|
||||||
`);
|
`);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user