add Symbol existence check to typeof helper - closes #2745

This commit is contained in:
Sebastian McKenzie 2015-11-02 19:26:49 +00:00
parent d1d0ed901e
commit 31a6cb9c57

View File

@ -2,7 +2,7 @@ import template from "babel-template";
export let _typeof = template(`
(function (obj) {
return obj && obj.constructor === Symbol ? "symbol" : typeof obj;
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
});
`);