only reload on errors when logged in

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2016-12-01 23:44:50 +01:00
parent ac1bf3c2b7
commit 8a3b660969
No known key found for this signature in database
GPG Key ID: 425003AC385454C5
1 changed files with 1 additions and 1 deletions

View File

@ -776,7 +776,7 @@ var OCP = {},
return;
}
if (_.contains([302, 303, 307, 401], xhr.status)) {
if (_.contains([302, 303, 307, 401], xhr.status) && OC.currentUser) {
// sometimes "beforeunload" happens later, so need to defer the reload a bit
setTimeout(function() {
if (!self._userIsNavigatingAway && !self._reloadCalled) {