mirror of
https://github.com/systemjs/systemjs.git
synced 2026-01-25 14:57:38 +00:00
curScript correction for async and defer
This commit is contained in:
parent
4933661d58
commit
adb5fdad65
@ -7,6 +7,8 @@ var doPolyfill = typeof Promise === 'undefined';
|
||||
if (typeof document !== 'undefined') {
|
||||
var scripts = document.getElementsByTagName('script');
|
||||
$__curScript = scripts[scripts.length - 1];
|
||||
if ($__curScript.defer || $__curScript.async)
|
||||
$__curScript = document.currentScript;
|
||||
if (doPolyfill) {
|
||||
var curPath = $__curScript.src;
|
||||
var basePath = curPath.substr(0, curPath.lastIndexOf('/') + 1);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user