system.register function return case

This commit is contained in:
guybedford 2016-08-05 16:15:13 +02:00
parent 273b37a42a
commit 91d257b5c5
2 changed files with 6 additions and 1 deletions

View File

@ -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;

View File

@ -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;