Remove unneeded [].indexOf fallback
This commit is contained in:
parent
1b0da44f38
commit
c2d473cf65
3 changed files with 3 additions and 3 deletions
|
@ -4,7 +4,7 @@ const binding = process.atomBinding('dialog');
|
|||
const v8Util = process.atomBinding('v8_util');
|
||||
|
||||
var slice = [].slice;
|
||||
var indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
|
||||
var indexOf = [].indexOf;
|
||||
|
||||
var fileDialogProperties = {
|
||||
openFile: 1 << 0,
|
||||
|
|
|
@ -2,7 +2,7 @@ const ipcRenderer = require('electron').ipcRenderer;
|
|||
const nativeImage = require('electron').nativeImage;
|
||||
|
||||
var nextId = 0;
|
||||
var indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
|
||||
var indexOf = [].indexOf;
|
||||
|
||||
var getNextId = function() {
|
||||
return ++nextId;
|
||||
|
|
|
@ -4,7 +4,7 @@ const v8Util = process.atomBinding('v8_util');
|
|||
|
||||
const callbacksRegistry = new CallbacksRegistry;
|
||||
|
||||
var indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
|
||||
var indexOf = [].indexOf;
|
||||
|
||||
// Check for circular reference.
|
||||
var isCircular = function(field, visited) {
|
||||
|
|
Loading…
Reference in a new issue