File tree Expand file tree Collapse file tree 2 files changed +20
-10
lines changed Expand file tree Collapse file tree 2 files changed +20
-10
lines changed Original file line number Diff line number Diff line change @@ -178,11 +178,16 @@ const EasyCoder_IWSY = {
178
178
switch ( action ) {
179
179
case `init` :
180
180
const cdn = program . getValue ( command . cdn ) ;
181
- program . require ( `js` , `${ cdn } /iwsy.js` ,
182
- function ( ) {
183
- program . run ( command . pc + 1 ) ;
184
- } ) ;
185
- return 0 ;
181
+ if ( typeof IWSY === `undefined` ) {
182
+ program . require ( `js` , `${ cdn } /iwsy.js` ,
183
+ function ( ) {
184
+ program . run ( command . pc + 1 ) ;
185
+ } ) ;
186
+ return 0 ;
187
+ } else {
188
+ program . run ( command . pc + 1 ) ;
189
+ }
190
+ break ;
186
191
case `load` :
187
192
const playerRecord = program . getSymbolRecord ( command . player ) ;
188
193
const player = playerRecord . element [ playerRecord . index ] ;
Original file line number Diff line number Diff line change @@ -178,11 +178,16 @@ const EasyCoder_IWSY = {
178
178
switch ( action ) {
179
179
case `init` :
180
180
const cdn = program . getValue ( command . cdn ) ;
181
- program . require ( `js` , `${ cdn } /iwsy.js` ,
182
- function ( ) {
183
- program . run ( command . pc + 1 ) ;
184
- } ) ;
185
- return 0 ;
181
+ if ( typeof IWSY === `undefined` ) {
182
+ program . require ( `js` , `${ cdn } /iwsy.js` ,
183
+ function ( ) {
184
+ program . run ( command . pc + 1 ) ;
185
+ } ) ;
186
+ return 0 ;
187
+ } else {
188
+ program . run ( command . pc + 1 ) ;
189
+ }
190
+ break ;
186
191
case `load` :
187
192
const playerRecord = program . getSymbolRecord ( command . player ) ;
188
193
const player = playerRecord . element [ playerRecord . index ] ;
You can’t perform that action at this time.
0 commit comments