We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eeee277 commit cbe1449Copy full SHA for cbe1449
index.js
@@ -3,6 +3,8 @@ const path = require('path');
3
const {app, ipcMain, ipcRenderer, shell} = require('electron');
4
const Conf = require('conf');
5
6
+let isInitialized = false;
7
+
8
// Set up the `ipcMain` handler for communication between renderer and main process.
9
const initDataListener = () => {
10
if (!ipcMain || !app) {
@@ -14,10 +16,16 @@ const initDataListener = () => {
14
16
appVersion: app.getVersion()
15
17
};
18
19
+ if (isInitialized) {
20
+ return appData;
21
+ }
22
23
ipcMain.on('electron-store-get-data', event => {
24
event.returnValue = appData;
25
});
26
27
+ isInitialized = true;
28
29
return appData;
30
31
0 commit comments