Skip to content
This repository was archived by the owner on Jul 13, 2020. It is now read-only.

Commit 046ab35

Browse files
committed
handle system register sharing
1 parent aea8f6e commit 046ab35

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/system-register-loader.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@ function SystemRegisterLoader(baseKey) {
1818

1919
// ensure System.register is available
2020
global.System = global.System || {};
21+
if (typeof global.System.register == 'function')
22+
var prevRegister = global.System.register;
2123
global.System.register = function() {
2224
loader.register.apply(loader, arguments);
25+
if (prevRegister)
26+
prevRegister.apply(this, arguments);
2327
};
2428
}
2529
SystemRegisterLoader.prototype = Object.create(RegisterLoader.prototype);

0 commit comments

Comments
 (0)