Skip to content

Commit

Permalink
fix: Only load Promise polyfill if window.Promise is missing [#1468] (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
straker authored and WilcoFiers committed Apr 4, 2019
1 parent b477e0d commit 1d70306
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/core/imports/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
* Polyfill `Promise`
* Reference: https://www.npmjs.com/package/es6-promise
*/
require('es6-promise').polyfill();
if (!('Promise' in window)) {
require('es6-promise').polyfill();
}

/**
* Namespace `axe.imports` which holds required external dependencies
Expand Down

0 comments on commit 1d70306

Please sign in to comment.