Mistake case where there is not profile

This commit is contained in:
Jean-Baptiste Dominguez 2018-07-02 14:34:33 +09:00
commit eaaafbba6f

View file

@ -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);
}
}
});
};