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'; 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) {