Skip to content

Commit

Permalink
Merge branch 'MDL-63210_master' of git://github.com/markn86/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
David Monllao committed Aug 27, 2018
2 parents 39d5bf0 + ce1db1f commit ed20d9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/amd/build/ajax.min.js

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

7 changes: 3 additions & 4 deletions lib/amd/src/ajax.js
Expand Up @@ -79,14 +79,13 @@ define(['jquery', 'core/config', 'core/log', 'core/url'], function($, config, Lo
}
// Something failed, reject the remaining promises.
if (exception !== null) {
// If the user isn't doing anything too important, redirect to the login page.
// Redirect to the login page.
if (exception.errorcode === "servicerequireslogin") {
window.location = URL.relativeUrl("/login/index.php");
} else {
for (; i < requests.length; i++) {
request = requests[i];
requests.forEach(function(request) {
request.deferred.reject(exception);
}
});
}
}
};
Expand Down

0 comments on commit ed20d9d

Please sign in to comment.