Replace app.productName with app.getName()

This commit is contained in:
David Meza 2017-09-11 15:29:32 -05:00
parent 06b5714bd0
commit 82c29dd848
3 changed files with 5 additions and 8 deletions

View file

@ -9,13 +9,12 @@ const AutoLaunch = require('auto-launch');
const {debounce} = require('underscore'); const {debounce} = require('underscore');
const settings = require('../../common/settings'); const settings = require('../../common/settings');
const appName = require('../../package.json').productName;
const TeamList = require('./TeamList.jsx'); const TeamList = require('./TeamList.jsx');
const AutoSaveIndicator = require('./AutoSaveIndicator.jsx'); const AutoSaveIndicator = require('./AutoSaveIndicator.jsx');
const appLauncher = new AutoLaunch({ const appLauncher = new AutoLaunch({
name: appName, name: remote.app.getName(),
isHidden: true isHidden: true
}); });

View file

@ -1,12 +1,10 @@
'use strict'; 'use strict';
const appName = require('../package.json').productName; const {remote} = require('electron');
window.eval = global.eval = () => { window.eval = global.eval = () => {
throw new Error(`Sorry, ${appName} does not support window.eval() for security reasons.`); throw new Error(`Sorry, ${remote.app.getName()} does not support window.eval() for security reasons.`);
}; };
const {remote} = require('electron');
const React = require('react'); const React = require('react');
const ReactDOM = require('react-dom'); const ReactDOM = require('react-dom');
const SettingsPage = require('./components/SettingsPage.jsx'); const SettingsPage = require('./components/SettingsPage.jsx');

View file

@ -1,5 +1,5 @@
const AutoLaunch = require('auto-launch'); const AutoLaunch = require('auto-launch');
const appName = require('../package.json').productName; const {remote} = require('electron');
function shouldQuitApp(cmd) { function shouldQuitApp(cmd) {
if (process.platform !== 'win32') { if (process.platform !== 'win32') {
@ -10,7 +10,7 @@ function shouldQuitApp(cmd) {
async function setupAutoLaunch(cmd) { async function setupAutoLaunch(cmd) {
const appLauncher = new AutoLaunch({ const appLauncher = new AutoLaunch({
name: appName, name: remote.app.getName(),
isHidden: true isHidden: true
}); });
if (cmd === '--squirrel-uninstall') { if (cmd === '--squirrel-uninstall') {