Fix console error at init
This commit is contained in:
parent
8ddcd519d3
commit
703022f054
1 changed files with 2 additions and 1 deletions
|
|
@ -27,6 +27,8 @@ angular.module('copayApp.directives')
|
||||||
var URI = bitcore.URI;
|
var URI = bitcore.URI;
|
||||||
var Address = bitcore.Address
|
var Address = bitcore.Address
|
||||||
var validator = function(value) {
|
var validator = function(value) {
|
||||||
|
if (!profileService.focusedClient)
|
||||||
|
return;
|
||||||
var networkName = profileService.focusedClient.credentials.network;
|
var networkName = profileService.focusedClient.credentials.network;
|
||||||
// Regular url
|
// Regular url
|
||||||
if (/^https?:\/\//.test(value)) {
|
if (/^https?:\/\//.test(value)) {
|
||||||
|
|
@ -51,7 +53,6 @@ angular.module('copayApp.directives')
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('[directives.js.53]', value, networkName); //TODO
|
|
||||||
// Regular Address
|
// Regular Address
|
||||||
ctrl.$setValidity('validAddress', Address.isValid(value, networkName));
|
ctrl.$setValidity('validAddress', Address.isValid(value, networkName));
|
||||||
return value;
|
return value;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue