Fix auto-redirect

This commit is contained in:
Blade Barringer
2015-10-30 22:28:11 -05:00
parent d37450622c
commit 391e09dd33

View File

@@ -251,7 +251,8 @@ angular.module('habitrpg')
$window.location.href='/';
});
} else {
if ($window.location.pathname.indexOf('/static') !== 0){
var isStaticOrSocial = $window.location.pathname.match(/^\/(static|social)/);
if (!isStaticOrSocial){
localStorage.clear();
$window.location.href = '/logout';
}