From c9abee3deddd89d96e9109154cb0260458f337cb Mon Sep 17 00:00:00 2001 From: Nico Hauser Date: Wed, 21 Jan 2026 09:56:00 +0100 Subject: [PATCH 1/2] fix: type narrowing for this.projectHost --- packages/scratch-gui/src/lib/legacy-storage.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/scratch-gui/src/lib/legacy-storage.ts b/packages/scratch-gui/src/lib/legacy-storage.ts index 961b6c2621..33cb8ece0c 100644 --- a/packages/scratch-gui/src/lib/legacy-storage.ts +++ b/packages/scratch-gui/src/lib/legacy-storage.ts @@ -69,11 +69,13 @@ export class LegacyStorage implements GUIStorage { vmState: string, params: { originalId: string; isCopy: boolean; isRemix: boolean; title: string; } ): Promise<{ id: string | number; }> { - if (!this.projectHost) { + const host = this.projectHost; + + if (!host) { return Promise.reject(new Error('Project host not set')); } // Haven't inlined the code here so that we can keep Git history on the implementation, just in case - return saveProjectToServer(this.projectHost, projectId, vmState, params); + return saveProjectToServer(host, projectId, vmState, params); } private cacheDefaultProject (storage: ScratchStorage) { From 0688000eb09931ac09db0ef7b0c10b5cad987cb9 Mon Sep 17 00:00:00 2001 From: Nico Hauser Date: Wed, 21 Jan 2026 09:56:02 +0100 Subject: [PATCH 2/2] chore: simplify imports --- packages/scratch-gui/src/index-standalone.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/scratch-gui/src/index-standalone.tsx b/packages/scratch-gui/src/index-standalone.tsx index 39cfdd4598..2bf3d94f87 100644 --- a/packages/scratch-gui/src/index-standalone.tsx +++ b/packages/scratch-gui/src/index-standalone.tsx @@ -6,8 +6,8 @@ import {EditorState} from './lib/editor-state'; import {ReactComponentLike} from 'prop-types'; import {compose} from 'redux'; -export {EditorState, EditorStateParams} from './lib/editor-state'; -export {AccountMenuOptions} from './lib/account-menu-options'; +export {EditorState, type EditorStateParams} from './lib/editor-state'; +export {type AccountMenuOptions} from './lib/account-menu-options'; export {setAppElement} from 'react-modal';