diff --git a/preload.js b/preload.js index 97c19b59d..c191ca94a 100644 --- a/preload.js +++ b/preload.js @@ -269,8 +269,9 @@ window.LokiAPI = new LokiServer({ window.mnemonic = require('./libloki/mnemonic'); const { WorkerInterface } = require('./js/modules/util_worker_interface'); -const worker = new WorkerInterface(path.join(app.getAppPath(), 'js', 'util_worker.js')); -window.callWorker = (fnName, ...args) => worker.callWorker(fnName, ...args); +const utilWorkerPath = path.join(app.getAppPath(), 'js', 'util_worker.js'); +const utilWorker = new WorkerInterface(utilWorkerPath); +window.callWorker = (fnName, ...args) => utilWorker.callWorker(fnName, ...args); // Linux seems to periodically let the event loop stop, so this is a global workaround setInterval(() => {