Skip to content

Commit

Permalink
Changed property descriptor for Array.includes polyfill (#1134)
Browse files Browse the repository at this point in the history
* changed property descriptor for Array.includes polyfill

* replaced defineProperty with shim

* removed Array.includes existance checking
  • Loading branch information
zwug authored and shellscape committed Oct 4, 2017
1 parent 5a7f26b commit ee7231b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/polyfills.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
'use strict';

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

// internal-ip@2.x uses [].includes
if (!Array.prototype.includes) {
Array.prototype.includes = require('array-includes');
}
const includes = require('array-includes');

includes.shim();

0 comments on commit ee7231b

Please sign in to comment.