@@ -140,6 +140,7 @@ export const editorInitialState = {
140140 sidebarShowing : true ,
141141 modals : { } ,
142142 errorDetails : { } ,
143+ runnerBeingLoaded : null | "pyodide" | "skulpt" ,
143144} ;
144145
145146export const EditorSlice = createSlice ( {
@@ -323,12 +324,15 @@ export const EditorSlice = createSlice({
323324 state . drawTriggered = false ;
324325 } ,
325326 loadingRunner : ( state , action ) => {
327+ state . runnerBeingLoaded = action . payload ;
326328 state . activeRunner = action . payload ;
327329 state . codeRunLoading = true ;
328330 } ,
329331 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+ }
332336 } ,
333337 resetRunner : ( state ) => {
334338 state . activeRunner = null ;
@@ -339,6 +343,7 @@ export const EditorSlice = createSlice({
339343 state . codeRunLoading = false ;
340344 state . codeRunTriggered = false ;
341345 state . codeRunStopped = false ;
346+ state . runnerBeingLoaded = null ;
342347 } ,
343348 closeAccessDeniedWithAuthModal : ( state ) => {
344349 state . accessDeniedWithAuthModalShowing = false ;
0 commit comments