Skip to content

Commit ee7231b

Browse files
zwugshellscape
authored andcommitted
Changed property descriptor for Array.includes polyfill (#1134)
* changed property descriptor for Array.includes polyfill * replaced defineProperty with shim * removed Array.includes existance checking
1 parent 5a7f26b commit ee7231b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/polyfills.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
'use strict';
22

33
/* polyfills for Node 4.8.x users */
4-
/* eslint no-extend-native: off, global-require: off */
54

65
// internal-ip@2.x uses [].includes
7-
if (!Array.prototype.includes) {
8-
Array.prototype.includes = require('array-includes');
9-
}
6+
const includes = require('array-includes');
7+
8+
includes.shim();

0 commit comments

Comments
 (0)