Remove global state

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne SavolainenandMikko Aspiala committed 2022-05-11 08:28:12 +03:00
1 parent fc04a4e17f
commit 88fe9b1b75
1 file changed
+1 -4
@@ -3,14 +3,11 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import type { AppPaths } from "../../common/app-paths/app-path-injection-token";
import { appPathsIpcChannel } from "../../common/app-paths/app-path-injection-token";
import getValueFromRegisteredChannelInjectable from "./get-value-from-registered-channel/get-value-from-registered-channel.injectable";
import appPathsStateInjectable from "../../common/app-paths/app-paths-state.injectable";
import { beforeFrameStartsInjectionToken } from "../before-frame-starts/before-frame-starts-injection-token";
let syncAppPaths: AppPaths;
const setupAppPathsInjectable = getInjectable({
id: "setup-app-paths",
@@ -20,7 +17,7 @@ const setupAppPathsInjectable = getInjectable({
getValueFromRegisteredChannelInjectable,
);
syncAppPaths = await getValueFromRegisteredChannel(appPathsIpcChannel);
const syncAppPaths = await getValueFromRegisteredChannel(appPathsIpcChannel);
const appPathsState = di.inject(appPathsStateInjectable);