-
-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Description
Hello,
I use vuepress (Vuejs) that use library using has-symbols, an error occured:
global is not defined in the library script
'use strict';
// V Error is throw next line V
var origSymbol = global.Symbol;
var hasSymbolSham = require('./shams');
module.exports = function hasNativeSymbols() {
if (typeof origSymbol !== 'function') { return false; }
if (typeof Symbol !== 'function') { return false; }
if (typeof origSymbol('foo') !== 'symbol') { return false; }
if (typeof Symbol('bar') !== 'symbol') { return false; }
return hasSymbolSham();
};So to correct it, I add in my scripts
window.global = windowI see that this error is throwed with angular also, so it looks that more and more framework doesn't support global 😉
Can you add a check on window.global to avoid create an error when it isn't define ?
Just emit a default value when not defined ?
Thank you 😃 😄
Have a nice day and be happy !
Kévin
Metadata
Metadata
Assignees
Labels
No labels