From bbcd674516aeeaf1ceaf205c478c56ea1f450b6b Mon Sep 17 00:00:00 2001 From: Yu-Hung Ou Date: Sun, 11 Mar 2018 23:17:14 +1100 Subject: [PATCH] updated lib/consts to access electron remote.app only when in production mode --- browser/lib/consts.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/browser/lib/consts.js b/browser/lib/consts.js index c6b2ea5b..23519916 100644 --- a/browser/lib/consts.js +++ b/browser/lib/consts.js @@ -1,10 +1,9 @@ const path = require('path') const fs = require('sander') const { remote } = require('electron') -const { app } = remote const themePath = process.env.NODE_ENV === 'production' - ? path.join(app.getAppPath(), './node_modules/codemirror/theme') + ? path.join(remote.app.getAppPath(), './node_modules/codemirror/theme') : require('path').resolve('./node_modules/codemirror/theme') const themes = fs.readdirSync(themePath) .map((themePath) => {