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:
parent
122d561a20
commit
9fe20699a0
1 changed files with 2 additions and 2 deletions
|
@ -48,7 +48,7 @@ export function doResolveUris(
|
||||||
});
|
});
|
||||||
|
|
||||||
if (urisToResolve.length === 0) {
|
if (urisToResolve.length === 0) {
|
||||||
return;
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
|
@ -157,7 +157,7 @@ export function doResolveClaimIds(claimIds: Array<string>) {
|
||||||
const idsToResolve = claimIds.filter((x) => !resolvedIds.includes(x));
|
const idsToResolve = claimIds.filter((x) => !resolvedIds.includes(x));
|
||||||
|
|
||||||
if (idsToResolve.length === 0) {
|
if (idsToResolve.length === 0) {
|
||||||
return;
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
return dispatch(
|
return dispatch(
|
||||||
|
|
Loading…
Reference in a new issue