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