removed !result catches
This commit is contained in:
parent
607ca4d98c
commit
b4876706fe
2 changed files with 3 additions and 6 deletions
|
@ -112,7 +112,7 @@ module.exports = {
|
|||
return new Promise((resolve, reject) => {
|
||||
db.getLongClaimId(claimName, claimId) // 1. get the long claim id
|
||||
.then(result => { // 2. get the asset using the long claim id
|
||||
if (result === NO_CLAIM || !result) {
|
||||
if (result === NO_CLAIM) {
|
||||
resolve(NO_CLAIM);
|
||||
return;
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ module.exports = {
|
|||
return new Promise((resolve, reject) => {
|
||||
db.getLongChannelId(channelName, channelId) // 1. get the long channel id
|
||||
.then(result => { // 2. get the long claim Id
|
||||
if (result === NO_CHANNEL || !result) {
|
||||
if (result === NO_CHANNEL) {
|
||||
resolve(NO_CHANNEL);
|
||||
return;
|
||||
}
|
||||
|
@ -140,9 +140,6 @@ module.exports = {
|
|||
if (result === NO_CHANNEL || result === NO_CLAIM) {
|
||||
resolve(result);
|
||||
return;
|
||||
} else if (!result) {
|
||||
resolve(NO_CLAIM);
|
||||
return;
|
||||
}
|
||||
resolve(getAssetByLongClaimId(result, claimName));
|
||||
})
|
||||
|
|
|
@ -73,7 +73,7 @@ function getTopFreeClaimIdByClaimName (name) {
|
|||
.then(result => {
|
||||
switch (result.length) {
|
||||
case 0:
|
||||
return resolve(null);
|
||||
return resolve(NO_CLAIM);
|
||||
default:
|
||||
return resolve(result[0].claimId);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue