fix(core): cleanup layout when switch page (#3794)

(cherry picked from commit da3dd1e324)
This commit is contained in:
Alex Yang
2023-08-16 23:34:56 -05:00
parent cf2cca86a3
commit dc6c3809e7
5 changed files with 79 additions and 54 deletions
+5
View File
@@ -106,6 +106,11 @@ const deleteLayoutAtom = atom<null, [string], void>(null, (_, set, id) => {
});
});
// clean up plugin windows when switching to other pages
rootStore.sub(currentPageAtom, () => {
rootStore.set(contentLayoutAtom, 'editor');
});
// module -> importName -> updater[]
export const _rootImportsMap = new Map<string, Map<string, any>>();
const rootImportsMapSetupPromise = setupImportsMap(_rootImportsMap, {