Mistake case where there is not profile
This commit is contained in:
parent
9224d40a65
commit
eaaafbba6f
1 changed files with 7 additions and 3 deletions
|
|
@ -203,10 +203,14 @@ angular.module('copayApp.services')
|
|||
root.getProfile = function(cb) {
|
||||
storage.get('profile', function(getErr, getStr) {
|
||||
if (getErr) {
|
||||
cb(getErr, null);
|
||||
return cb(getErr, null);
|
||||
} else {
|
||||
profile = Profile.fromString(getStr);
|
||||
cb(null, profile);
|
||||
if (!getStr) {
|
||||
return cb(null, null);
|
||||
} else {
|
||||
profile = Profile.fromString(getStr);
|
||||
return cb(null, profile);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue