diff --git a/src/common/__tests__/hotbar-store.test.ts b/src/common/__tests__/hotbar-store.test.ts index 3dab5897db..788ecbdc94 100644 --- a/src/common/__tests__/hotbar-store.test.ts +++ b/src/common/__tests__/hotbar-store.test.ts @@ -9,7 +9,6 @@ import logger from "../../main/logger"; import type { CatalogEntity, CatalogEntityData, CatalogEntityKindData } from "../catalog"; import { HotbarStore } from "../hotbar-store"; import { getDiForUnitTesting } from "../../main/getDiForUnitTesting"; -import hotbarStoreInjectable from "../hotbar-store.injectable"; import getConfigurationFileModelInjectable from "../get-configuration-file-model/get-configuration-file-model.injectable"; import appVersionInjectable from "../get-configuration-file-model/app-version/app-version.injectable"; import type { DiContainer } from "@ogre-tools/injectable"; @@ -128,7 +127,6 @@ describe("HotbarStore", () => { beforeEach(async () => { di = getDiForUnitTesting({ doGeneralOverrides: true }); - di.permitSideEffects(hotbarStoreInjectable); di.permitSideEffects(getConfigurationFileModelInjectable); di.permitSideEffects(appVersionInjectable); }); diff --git a/src/common/hotbar-store.injectable.ts b/src/common/hotbar-store.injectable.ts index 910c0f26f5..e2250d0510 100644 --- a/src/common/hotbar-store.injectable.ts +++ b/src/common/hotbar-store.injectable.ts @@ -369,14 +369,10 @@ const hotbarStoreInjectable = getInjectable({ instantiate: (di) => { HotbarStore.resetInstance(); - const instance = HotbarStore.createInstance({ + return HotbarStore.createInstance({ catalogCatalogEntity: di.inject(catalogCatalogEntityInjectable), }); - - return instance; }, - - causesSideEffects: true, }); export default hotbarStoreInjectable;