Skip to content

Commit

Permalink
Merge pull request mozilla#9520 from Snuffleupagus/fix-includes-polyf…
Browse files Browse the repository at this point in the history
…ills

Attempt to fix the `Array.prototype.includes` and `String.prototype.includes` polyfills (issue 9514, 9516)
  • Loading branch information
Rob--W authored Mar 1, 2018
2 parents c3ee2eb + e1e6f92 commit 86727b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/shared/compatibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable no-extend-native, mozilla/use-includes-instead-of-indexOf */
/* eslint-disable mozilla/use-includes-instead-of-indexOf */
/* globals PDFJS */

// Skip compatibility checks for the extensions and if we already ran
Expand Down Expand Up @@ -131,7 +131,7 @@ PDFJS.compatibilityChecked = true;
if (String.prototype.includes) {
return;
}
String.prototype.includes = require('core-js/fn/string/includes');
require('core-js/fn/string/includes');
})();

// Provides support for Array.prototype.includes in legacy browsers.
Expand All @@ -140,7 +140,7 @@ PDFJS.compatibilityChecked = true;
if (Array.prototype.includes) {
return;
}
Array.prototype.includes = require('core-js/fn/array/includes');
require('core-js/fn/array/includes');
})();

// Provides support for Math.log2 in legacy browsers.
Expand Down

0 comments on commit 86727b6

Please sign in to comment.