add comment for window undefined

This commit is contained in:
yinkaile
2017-10-23 15:10:19 +08:00
parent 93910fbb9a
commit cd302bbc03
+2
View File
@@ -106,6 +106,8 @@
/**
* @property {Boolean} CC_TEST - Running in the engine's unit test.
*/
// window may be undefined when first load engine from editor
var _global = typeof window === 'undefined' ? global : window;
function defineMacro (name, defaultValue) {
// if "global_defs" not preprocessed by uglify, just declare them globally,