db/API.js: early return to make error handling evident. No functional changes
parent
67ce19eddb
commit
b59818676e
|
@ -949,11 +949,10 @@ exports.getPadID = function(roID, callback)
|
||||||
if(retrievedPadID == null)
|
if(retrievedPadID == null)
|
||||||
{
|
{
|
||||||
callback(new customError("padID does not exist","apierror"));
|
callback(new customError("padID does not exist","apierror"));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
callback(null, {padID: retrievedPadID});
|
||||||
callback(null, {padID: retrievedPadID});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue