Make injecting legacy singleton always provide new instance

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen committed 2022-03-31 15:13:32 +03:00
1 parent 39795d8f35
commit 76101023df
4 files changed
+28 -4

No files matched your search

+7 -1
View File
@@ -7,7 +7,13 @@ import { ThemeStore } from "./theme.store";
const themeStoreInjectable = getInjectable({
id: "theme-store",
instantiate: () => ThemeStore.createInstance(),
instantiate: () => {
ThemeStore.resetInstance();
return ThemeStore.createInstance();
},
causesSideEffects: true,
});