Clean up variable declarations

This commit is contained in:
Jessica Lord 2016-01-14 18:07:29 -08:00
parent 5a4a8e1fa7
commit 003de0debe
4 changed files with 9 additions and 9 deletions

View file

@ -60,10 +60,10 @@ var fn = function(name) {
return webContents.emit.apply(webContents, [name, event].concat(slice.call(args)));
});
};
var i, len;
var i, len, name;
for (i = 0, len = ref1.length; i < len; i++) {
var name = ref1[i];
fn(name);
name = ref1[i];
fn(ref1[i]);
}
// Deprecated.

View file

@ -163,8 +163,8 @@ module.exports = {
// Mark standard asynchronous functions.
var ref1 = ['showMessageBox', 'showOpenDialog', 'showSaveDialog'];
var j, len
var j, len, api;
for (j = 0, len = ref1.length; j < len; j++) {
var api = ref1[j];
api = ref1[j];
v8Util.setHiddenValue(module.exports[api], 'asynchronous', true);
}

View file

@ -91,9 +91,9 @@ require('./guest-window-manager');
// Now we try to load app's package.json.
var packageJson = null;
var searchPaths = ['app', 'app.asar', 'default_app'];
var i, len;
var i, len, packagePath;
for (i = 0, len = searchPaths.length; i < len; i++) {
var packagePath = searchPaths[i];
packagePath = searchPaths[i];
try {
packagePath = path.join(process.resourcesPath, packagePath);
packageJson = JSON.parse(fs.readFileSync(path.join(packagePath, 'package.json')));

View file

@ -45,9 +45,9 @@ var nodeIntegration = 'false';
var preloadScript = null;
var ref = process.argv;
var i, len;
var i, len, arg;
for (i = 0, len = ref.length; i < len; i++) {
var arg = ref[i];
arg = ref[i];
if (arg.indexOf('--guest-instance-id=') === 0) {
// This is a guest web view.
process.guestInstanceId = parseInt(arg.substr(arg.indexOf('=') + 1));