Skip to content

Commit

Permalink
3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Mar 3, 2019
1 parent cdd3551 commit 836db7b
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 32 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
SystemJS 3.0.1 (2019/03/01)
* Ensure that instantiate errors can be cleared with loader.delete (#1902)
* Fix undefined err bug on errors (#1898)
* Add loader.has / loader.set API (#1899, 6b85a8c4)

SystemJS 3.0.0 (2019/01/12)
* Implement new Import Maps specification replacing Package Name Maps (#1893)

Expand Down
26 changes: 14 additions & 12 deletions dist/s.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SJS 3.0.0
* SJS 3.0.1
* Minimal SystemJS Build
*/
(function () {
Expand Down Expand Up @@ -229,8 +229,10 @@
});
});

// disable unhandled rejections
linkPromise.catch(function () {});
linkPromise.catch(function (err) {
load.e = null;
load.er = err;
});

// Captial letter = a promise function
return load = loader[REGISTRY][id] = {
Expand Down Expand Up @@ -258,7 +260,7 @@

// On execution we have populated:
// the execution error if any
eE: undefined,
er: undefined,
// in the case of TLA, the execution promise
E: undefined,

Expand Down Expand Up @@ -303,8 +305,8 @@
seen[load.id] = true;

if (!load.e) {
if (load.eE)
throw load.eE;
if (load.er)
throw load.er;
if (load.E)
return load.E;
return;
Expand Down Expand Up @@ -340,7 +342,7 @@
load.C = load.n;
}
catch (err) {
load.eE = err;
load.er = err;
throw err;
}
finally {
Expand All @@ -356,15 +358,15 @@
* Supports loading System.register via script tag injection
*/

let err$1;
let err;
if (typeof window !== 'undefined')
window.addEventListener('error', function (e) {
err$1 = e.error;
err = e.error;
});

const systemRegister = systemJSPrototype.register;
systemJSPrototype.register = function (deps, declare) {
err$1 = undefined;
err = undefined;
systemRegister.call(this, deps, declare);
};

Expand All @@ -381,8 +383,8 @@
script.addEventListener('load', function () {
document.head.removeChild(script);
// Note URL normalization issues are going to be a careful concern here
if (err$1)
return reject(err$1);
if (err)
return reject(err);
else
resolve(loader.getRegister());
});
Expand Down
2 changes: 1 addition & 1 deletion dist/s.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 836db7b

Please sign in to comment.