doResolveUris, doResolveClaimIds: Return resolved empty results rather than undefined promise for the no-op case.

This allows clients to chain without needs to check if it's undefined.
This commit is contained in:
infinite-persistence 2022-03-29 10:06:06 +08:00 committed by Thomas Zarebczan
parent 122d561a20
commit 9fe20699a0

View file

@ -48,7 +48,7 @@ export function doResolveUris(
});
if (urisToResolve.length === 0) {
return;
return Promise.resolve();
}
dispatch({
@ -157,7 +157,7 @@ export function doResolveClaimIds(claimIds: Array<string>) {
const idsToResolve = claimIds.filter((x) => !resolvedIds.includes(x));
if (idsToResolve.length === 0) {
return;
return Promise.resolve();
}
return dispatch(