redir to home if no wallets at #open

This commit is contained in:
Matias Alejo Garcia 2014-08-15 10:41:34 -04:00
parent 5753f406e0
commit f14d83cee1
1 changed files with 4 additions and 0 deletions

View File

@ -15,6 +15,10 @@ angular.module('copayApp.controllers').controller('OpenController', function($sc
$scope.openPassword = '';
$scope.isMobile = !!window.cordova;
if (!$scope.wallets.length){
$location.path('/');
}
$scope.open = function(form) {
if (form && form.$invalid) {
notification.error('Error', 'Please enter the required fields');