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) {
|
root.getProfile = function(cb) {
|
||||||
storage.get('profile', function(getErr, getStr) {
|
storage.get('profile', function(getErr, getStr) {
|
||||||
if (getErr) {
|
if (getErr) {
|
||||||
cb(getErr, null);
|
return cb(getErr, null);
|
||||||
} else {
|
} else {
|
||||||
profile = Profile.fromString(getStr);
|
if (!getStr) {
|
||||||
cb(null, profile);
|
return cb(null, null);
|
||||||
|
} else {
|
||||||
|
profile = Profile.fromString(getStr);
|
||||||
|
return cb(null, profile);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue