Skip to content

Commit

Permalink
BUG: Always continue loading scripts even if one script fails.
Browse files Browse the repository at this point in the history
This is especially important so that the deferred callbacks are triggered in the end.

Also show error messages of JS scripts that failed loading, rather than failing silently.
  • Loading branch information
bergice authored and Maxime Rainville committed Dec 12, 2018
1 parent 78cafb9 commit e624376
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/vendor.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion thirdparty/jquery-ondemand/jquery.ondemand.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,13 @@
$.ajax({
dataType: 'script',
url: newJsInclude,
success: function() {
complete: function() {
self._ondemand_loaded_list[newJsInclude] = 1;
getScriptQueue();
},
error: function(xhr, status, error) {
console.error(error);
},
cache: false,
// jQuery seems to override the XHR objects if used in async mode
async: false
Expand Down

0 comments on commit e624376

Please sign in to comment.