Skip to content

Commit

Permalink
6.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Aug 5, 2020
1 parent 3bf22cb commit 48901ea
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 32 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
SystemJS 6.4.2
* Fix and simplify auto import domready resets (https://github.com/systemjs/systemjs/pull/2225)

SystemJS 6.4.1
* Fix auto import handling of dynamic import races during loading phase (https://github.com/systemjs/systemjs/pull/2223)
* Fix crossOrigin script attribute loading in Safari (https://github.com/systemjs/systemjs/pull/2222)
Expand Down
17 changes: 4 additions & 13 deletions dist/s.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SJS 6.4.1
* SJS 6.4.2
* Minimal SystemJS Build
*/
(function () {
Expand Down Expand Up @@ -527,7 +527,6 @@
var lastAutoImportUrl, lastAutoImportDeps;
var autoImportCandidates = {};
var systemRegister = systemJSPrototype.register;
var timeoutCnt = 0;
systemJSPrototype.register = function (deps, declare) {
if (hasDocument && document.readyState === 'loading' && typeof deps !== 'string') {
var scripts = document.getElementsByTagName('script');
Expand All @@ -537,17 +536,9 @@
lastAutoImportUrl = url;
lastAutoImportDeps = deps;
autoImportCandidates[url] = [deps, declare];
var loader = this;
// This timeout ensures that if this is a dynamic script injection by SystemJS
// that the auto import will be cleared after the timeout and hence will not
// be auto imported
timeoutCnt++;
setTimeout(function () {
if (autoImportCandidates[url])
loader.import(url);
if (--timeoutCnt === 0 && document.readyState !== 'loading')
autoImportCandidates = {};
});
// if this is already a System load, then the instantiate has already begun
// so this re-import has no consequence
this.import(url);
}
}
else {
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.

2 changes: 1 addition & 1 deletion dist/s.min.js.map

Large diffs are not rendered by default.

17 changes: 4 additions & 13 deletions dist/system.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SystemJS 6.4.1
* SystemJS 6.4.2
*/
(function () {
function errMsg(errCode, msg) {
Expand Down Expand Up @@ -535,7 +535,6 @@
var lastAutoImportUrl, lastAutoImportDeps;
var autoImportCandidates = {};
var systemRegister = systemJSPrototype.register;
var timeoutCnt = 0;
systemJSPrototype.register = function (deps, declare) {
if (hasDocument && document.readyState === 'loading' && typeof deps !== 'string') {
var scripts = document.getElementsByTagName('script');
Expand All @@ -545,17 +544,9 @@
lastAutoImportUrl = url;
lastAutoImportDeps = deps;
autoImportCandidates[url] = [deps, declare];
var loader = this;
// This timeout ensures that if this is a dynamic script injection by SystemJS
// that the auto import will be cleared after the timeout and hence will not
// be auto imported
timeoutCnt++;
setTimeout(function () {
if (autoImportCandidates[url])
loader.import(url);
if (--timeoutCnt === 0 && document.readyState !== 'loading')
autoImportCandidates = {};
});
// if this is already a System load, then the instantiate has already begun
// so this re-import has no consequence
this.import(url);
}
}
else {
Expand Down

0 comments on commit 48901ea

Please sign in to comment.