mirror of
https://github.com/systemjs/systemjs.git
synced 2026-02-01 15:59:54 +00:00
Merge pull request #1451 from PhilippMi/ie-async-scripts
Check for document.currentScript before assigning it
This commit is contained in:
commit
530c9ea192
@ -7,7 +7,7 @@ var doPolyfill = typeof Promise === 'undefined';
|
||||
if (typeof document !== 'undefined') {
|
||||
var scripts = document.getElementsByTagName('script');
|
||||
$__curScript = scripts[scripts.length - 1];
|
||||
if ($__curScript.defer || $__curScript.async)
|
||||
if (document.currentScript && ($__curScript.defer || $__curScript.async))
|
||||
$__curScript = document.currentScript;
|
||||
if (doPolyfill) {
|
||||
var curPath = $__curScript.src;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user