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) => {