mirror of
https://github.com/systemjs/systemjs.git
synced 2026-01-25 14:57:38 +00:00
disable script loads when using authorization
This commit is contained in:
parent
3adf8a9d10
commit
bf39fdfe4e
@ -31,7 +31,7 @@
|
||||
|
||||
hook('fetch', function(fetch) {
|
||||
return function(load) {
|
||||
if (load.metadata.format === 'amd')
|
||||
if (load.metadata.format === 'amd' && !load.metadata.authorization)
|
||||
load.metadata.scriptLoad = true;
|
||||
if (load.metadata.scriptLoad)
|
||||
this.get('@@amd-helpers').createDefine(this);
|
||||
|
||||
@ -30,7 +30,7 @@ hook('fetch', function(fetch) {
|
||||
|
||||
// A global with exports, no globals and no deps
|
||||
// can be loaded via a script tag
|
||||
if (load.metadata.format == 'global'
|
||||
if (load.metadata.format == 'global' && !load.metadata.authorization
|
||||
&& load.metadata.exports && !load.metadata.globals
|
||||
&& (!load.metadata.deps || load.metadata.deps.length == 0))
|
||||
load.metadata.scriptLoad = true;
|
||||
|
||||
@ -452,7 +452,7 @@
|
||||
anonRegister = null;
|
||||
calledRegister = false;
|
||||
|
||||
if (load.metadata.format == 'register')
|
||||
if (load.metadata.format == 'register' && !load.metadata.authorization)
|
||||
load.metadata.scriptLoad = true;
|
||||
|
||||
// NB remove when "deps " is deprecated
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user