fix starting

This commit is contained in:
Matias Alejo Garcia 2017-04-18 17:19:11 -03:00
commit 43f04d4296
No known key found for this signature in database
GPG key ID: 02470DB551277AB3
2 changed files with 6 additions and 4 deletions

View file

@ -175,7 +175,12 @@ angular.module('copayApp.controllers').controller('pinController', function($sta
$scope.close = function(delay) {
$timeout(function() {
$ionicHistory.viewHistory().backView ? $ionicHistory.goBack() : $state.go('tabs.home');
var shouldReturn = $ionicHistory.viewHistory().backView && $ionicHistory.viewHistory().backView.stateName != 'starting';
if (shouldReturn)
$ionicHistory.goBack()
else
$state.go('tabs.home');
}, delay || 1);
};
});