From 81303d68dd29f4c86174db552c76c14e29d5184f Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Wed, 12 Jun 2019 19:22:39 -0500 Subject: [PATCH] Refactoring --- src/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index a986f74..3270d16 100644 --- a/src/index.js +++ b/src/index.js @@ -13,6 +13,8 @@ import * as serviceWorker from './serviceWorker'; const Constants = require('./constants'); const ipcRenderer = getIPCRenderer(); +let store; + if (ipcRenderer) { ipcRenderer.on(Constants.IPC_Get_Platform_Reply, (event, arg) => { if (arg.Platform === 'linux') { @@ -20,7 +22,7 @@ if (ipcRenderer) { root.style.setProperty('--default_font_size', '15px'); } - const store = createAppStore(arg.Platform, arg.AppPlatform, packageJson.version); + store = createAppStore(arg.Platform, arg.AppPlatform, packageJson.version); ipcRenderer.on(Constants.IPC_Get_State_Reply, (event, arg) => { if (arg.data) { store.dispatch(setActiveRelease(arg.data.Release, arg.data.Version));