diff --git a/common/script/public/userServices.js b/common/script/public/userServices.js index b26a4c531d..67d705e8b7 100644 --- a/common/script/public/userServices.js +++ b/common/script/public/userServices.js @@ -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'; }