Don't reload on a timeout when refreshing the navbar

This commit is contained in:
Isaac Connor 2018-10-11 11:30:30 -04:00
parent ad71b0c626
commit d1bef49d0b
1 changed files with 6 additions and 5 deletions

View File

@ -195,11 +195,12 @@ if ( currentView != 'none' && currentView != 'login' ) {
$j.getJSON(thisUrl + '?view=request&request=status&entity=navBar') $j.getJSON(thisUrl + '?view=request&request=status&entity=navBar')
.done(setNavBar) .done(setNavBar)
.fail(function( jqxhr, textStatus, error ) { .fail(function( jqxhr, textStatus, error ) {
var err = textStatus + ", " + error; console.log( "Request Failed: " + textStatus + ", " + error);
console.log( "Request Failed: " + err ); if ( textStatus != "timeout" ) {
// The idea is that this should only fail due to auth, so reload the page // The idea is that this should only fail due to auth, so reload the page
// which should go to login if it can't stay logged in. // which should go to login if it can't stay logged in.
window.location.reload( true ); window.location.reload( true );
}
}); });
} }