File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -171,8 +171,9 @@ const AppContent: React.FC<AppContentProps> = ({ project, setProject }): React.J
171171 const [ languageInitialized , setLanguageInitialized ] = React . useState ( false ) ;
172172 const [ themeInitialized , setThemeInitialized ] = React . useState ( false ) ;
173173
174- const blocksEditor = React . useRef < editor . Editor | null > ( null ) ;
175174 const generatorContext = React . useRef < GeneratorContext | null > ( null ) ;
175+
176+ const blocksEditor = React . useRef < editor . Editor | null > ( null ) ;
176177 const blocklyComponent = React . useRef < BlocklyComponentType | null > ( null ) ;
177178
178179 /** Initialize language from UserSettings when app first starts. */
@@ -411,6 +412,7 @@ const AppContent: React.FC<AppContentProps> = ({ project, setProject }): React.J
411412 // Initialize blocks when app loads
412413 React . useEffect ( ( ) => {
413414 initializeBlocks ( ) ;
415+ generatorContext . current = createGeneratorContext ( ) ;
414416 } , [ ] ) ;
415417
416418 React . useEffect ( ( ) => {
@@ -442,8 +444,6 @@ const AppContent: React.FC<AppContentProps> = ({ project, setProject }): React.J
442444
443445 registerToolboxButton ( newWorkspace , messageApi ) ;
444446
445- generatorContext . current = createGeneratorContext ( ) ;
446-
447447 if ( currentModule ) {
448448 generatorContext . current . setModule ( currentModule ) ;
449449 }
You can’t perform that action at this time.
0 commit comments