Browse Source

this will fix the node execution context issue

Raanan Weber 7 years ago
parent
commit
dfbe14e1d5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Tools/Gulp/gulp-addModuleExports.js

+ 1 - 1
Tools/Gulp/gulp-addModuleExports.js

@@ -46,7 +46,7 @@ module.exports = function (varName, config) {
                     amdText += `        ${dep.optional ? ' if(require.specified && require.specified("' + dep.module + '"))' : ''} amdDependencies.push("${dep.module}");
 `;
                     dependenciesDefinition += `
-    var ${dep.name} = root.${dep.name};`;
+    var ${dep.name} = root.${dep.name} || this.${dep.name};`;
                     afterInitText += `  ${dep.name} = ${dep.name} || this.${dep.name};
 `
                 });