@@ -140,6 +140,7 @@ export const editorInitialState = {
140
140
sidebarShowing : true ,
141
141
modals : { } ,
142
142
errorDetails : { } ,
143
+ runnerBeingLoaded : null | "pyodide" | "skulpt" ,
143
144
} ;
144
145
145
146
export const EditorSlice = createSlice ( {
@@ -323,12 +324,15 @@ export const EditorSlice = createSlice({
323
324
state . drawTriggered = false ;
324
325
} ,
325
326
loadingRunner : ( state , action ) => {
327
+ state . runnerBeingLoaded = action . payload ;
326
328
state . activeRunner = action . payload ;
327
329
state . codeRunLoading = true ;
328
330
} ,
329
331
setLoadedRunner : ( state , action ) => {
330
- state . loadedRunner = action . payload ;
331
- state . codeRunLoading = false ;
332
+ if ( state . runnerBeingLoaded === action . payload ) {
333
+ state . loadedRunner = action . payload ;
334
+ state . codeRunLoading = false ;
335
+ }
332
336
} ,
333
337
resetRunner : ( state ) => {
334
338
state . activeRunner = null ;
@@ -339,6 +343,7 @@ export const EditorSlice = createSlice({
339
343
state . codeRunLoading = false ;
340
344
state . codeRunTriggered = false ;
341
345
state . codeRunStopped = false ;
346
+ state . runnerBeingLoaded = null ;
342
347
} ,
343
348
closeAccessDeniedWithAuthModal : ( state ) => {
344
349
state . accessDeniedWithAuthModalShowing = false ;
0 commit comments