Skip to content

Commit

Permalink
Merge branch 'master' into feature/npm3
Browse files Browse the repository at this point in the history
  • Loading branch information
cdebost committed Feb 12, 2019
2 parents 3d53d09 + 864a8dc commit ce29acb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ bootstrap("require/browser", function (require) {
};

var loadIfNotPreloaded = function (location, definition, preloaded) {
var loadScript = Require.delegate && Require.delegate.loadScript || Require.loadScript;
// The package.json might come in a preloading bundle. If so, we do not
// want to issue a script injection. However, if by the time preloading
// has finished the package.json has not arrived, we will need to kick off
Expand All @@ -208,13 +209,13 @@ bootstrap("require/browser", function (require) {
preloaded
.then(function () {
if (definition.isPending()) {
Require.loadScript(location);
loadScript(location);
}
});
} else if (definition.isPending()) {
// otherwise preloading has already completed and we don't have the
// module, so load it
Require.loadScript(location);
loadScript(location);
}
};

Expand Down

0 comments on commit ce29acb

Please sign in to comment.