From 9fe165fefb111c54d8c56e8d5f253a0473bad19b Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Fri, 31 Oct 2014 16:14:52 -0300 Subject: [PATCH] reload on logout --- js/services/controllerUtils.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/js/services/controllerUtils.js b/js/services/controllerUtils.js index b371bd332..475a9adff 100644 --- a/js/services/controllerUtils.js +++ b/js/services/controllerUtils.js @@ -38,15 +38,9 @@ angular.module('copayApp.services') delete $rootScope['wallet']; delete $rootScope['iden']; - // Clear rootScope - for (var i in $rootScope) { - if (i.charAt(0) != '$') { - delete $rootScope[i]; - } - } - - $location.path('/'); - + // Go home reloading the application + var hashIndex = window.location.href.indexOf('#!/'); + window.location = window.location.href.substr(0, hashIndex); }); } };