File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,17 +45,17 @@ define([
4545 this . pluginMetadata = pluginMetadata ;
4646
4747 this . settings = _ . extend ( { } , DEFAULT_SETTINGS ) ;
48- if ( typeof WebGMEGlobal === 'undefined' ) { // Running in NodeJS
49- const path = require ( 'path' ) ;
50- const dirname = path . dirname ( module . uri ) ;
51- const deploymentSettings = JSON . parse ( requirejs ( 'text!' + dirname + '/../../../config/components.json' ) ) ;
52- _ . extend ( this . settings , deploymentSettings ) ;
53- } else { // Running in the browser
48+ if ( require . isBrowser ) {
5449 const ComponentSettings = requirejs ( 'js/Utils/ComponentSettings' ) ;
5550 ComponentSettings . resolveWithWebGMEGlobal (
5651 this . settings ,
5752 this . getComponentId ( )
5853 ) ;
54+ } else { // Running in NodeJS
55+ const path = require ( 'path' ) ;
56+ const dirname = path . dirname ( module . uri ) ;
57+ const deploymentSettings = JSON . parse ( requirejs ( 'text!' + dirname + '/../../../config/components.json' ) ) ;
58+ _ . extend ( this . settings , deploymentSettings ) ;
5959 }
6060 } ;
6161
You can’t perform that action at this time.
0 commit comments