mirror of
https://github.com/systemjs/systemjs.git
synced 2026-02-01 15:59:54 +00:00
system.register function return case
This commit is contained in:
parent
273b37a42a
commit
91d257b5c5
@ -54,7 +54,8 @@ hookConstructor(function(constructor) {
|
||||
this.map = {};
|
||||
|
||||
// make the location of the system.js script accessible
|
||||
if ($__curScript !== undefined) this.scriptSrc = $__curScript.src;
|
||||
if (typeof $__curScript != 'undefined')
|
||||
this.scriptSrc = $__curScript.src;
|
||||
|
||||
// global behaviour flags
|
||||
this.warnings = false;
|
||||
|
||||
@ -293,6 +293,10 @@ function createEntry() {
|
||||
return value;
|
||||
}, { id: entry.name });
|
||||
|
||||
if (typeof declaration == 'function')
|
||||
declaration = { setters: [], execute: declaration };
|
||||
|
||||
// allowing undefined declaration was a mistake! To be deprecated.
|
||||
declaration = declaration || { setters: [], execute: function() {} };
|
||||
|
||||
module.setters = declaration.setters;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user