diff --git a/lib/browser/api/menu-item.js b/lib/browser/api/menu-item.js index 20666b0f36e..f50e0ed84e5 100644 --- a/lib/browser/api/menu-item.js +++ b/lib/browser/api/menu-item.js @@ -89,7 +89,9 @@ MenuItem = (function () { if (defaultValue == null) { defaultValue = null } - return this[name] != null ? this[name] : this[name] = defaultValue + this[name] != null ? this[name] : this[name] = defaultValue + + return this[name] } MenuItem.prototype.overrideReadOnlyProperty = function (name, defaultValue) { diff --git a/lib/common/asar.js b/lib/common/asar.js index 1d8474d1c56..6adc24e8ded 100644 --- a/lib/common/asar.js +++ b/lib/common/asar.js @@ -1,6 +1,6 @@ (function () { const asar = process.binding('atom_common_asar') - const child_process = require('child_process') + const childProcess = require('child_process') const path = require('path') const util = require('util') @@ -591,13 +591,13 @@ } // Executing a command string containing a path to an asar - // archive confuses `child_process.execFile`, which is internally - // called by `child_process.{exec,execSync}`, causing + // archive confuses `childProcess.execFile`, which is internally + // called by `childProcess.{exec,execSync}`, causing // Electron to consider the full command as a single path // to an archive. [ 'exec', 'execSync' ].forEach(function (functionName) { - var old = child_process[functionName] - child_process[functionName] = function () { + var old = childProcess[functionName] + childProcess[functionName] = function () { var processNoAsarOriginalValue = process.noAsar process.noAsar = true var result = old.apply(this, arguments) @@ -607,10 +607,10 @@ }) overrideAPI(fs, 'open') - overrideAPI(child_process, 'execFile') + overrideAPI(childProcess, 'execFile') overrideAPISync(process, 'dlopen', 1) overrideAPISync(require('module')._extensions, '.node', 1) overrideAPISync(fs, 'openSync') - return overrideAPISync(child_process, 'execFileSync') + return overrideAPISync(childProcess, 'execFileSync') } })() diff --git a/lib/renderer/override.js b/lib/renderer/override.js index 8d47573b2fe..35ca80f16af 100644 --- a/lib/renderer/override.js +++ b/lib/renderer/override.js @@ -15,8 +15,9 @@ var BrowserWindowProxy = (function () { BrowserWindowProxy.proxies = {} BrowserWindowProxy.getOrCreate = function (guestId) { - var base - return (base = this.proxies)[guestId] != null ? base[guestId] : base[guestId] = new BrowserWindowProxy(guestId) + var base = this.proxies + base[guestId] != null ? base[guestId] : base[guestId] = new BrowserWindowProxy(guestId) + return base[guestId] } BrowserWindowProxy.remove = function (guestId) { diff --git a/package.json b/package.json index 89837aa70f2..6a515cb26e1 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "devDependencies": { "asar": "^0.11.0", "request": "*", - "standard": "^6.0.8" + "standard": "^7.1.0" }, "optionalDependencies": { "runas": "^3.0.0"