Merge pull request #11237 from Snuffleupagus/compatibility-SKIP_BABEL

Update `src/shared/compatibility.js` to only run with `SKIP_BABEL = false` set
This commit is contained in:
Tim van der Meij 2019-10-13 12:22:22 +02:00 committed by GitHub
commit ff37cdb5d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,13 +12,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint no-var: error */
const globalScope = require('./global_scope');
// Skip compatibility checks for the extensions and if we already ran
// this module.
if ((typeof PDFJSDev === 'undefined' ||
!PDFJSDev.test('FIREFOX || MOZCENTRAL')) &&
// Skip compatibility checks for modern builds and if we already ran the module.
if ((typeof PDFJSDev === 'undefined' || !PDFJSDev.test('SKIP_BABEL')) &&
!globalScope._pdfjsCompatibilityChecked) {
globalScope._pdfjsCompatibilityChecked = true;