From 5cc1895797c78fee98f72f47c03ccbae1ddb9f2b Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Mon, 20 Aug 2018 12:14:37 +0200 Subject: [PATCH] Add a `Symbol` polyfill, using core-js, to allow using `for...of` loops https://github.com/zloirock/core-js#ecmascript-symbol --- src/shared/compatibility.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/shared/compatibility.js b/src/shared/compatibility.js index 6855c2faa16ae2..a44afbbdb5f88b 100644 --- a/src/shared/compatibility.js +++ b/src/shared/compatibility.js @@ -165,6 +165,14 @@ const hasDOM = typeof window === 'object' && typeof document === 'object'; globalScope.WeakMap = require('core-js/fn/weak-map'); })(); +// Support: IE +(function checkSymbol() { + if (globalScope.Symbol) { + return; + } + require('core-js/es6/symbol'); +})(); + } // End of !PDFJSDev.test('CHROME') // Provides support for Object.values in legacy browsers.