forked from mystiq/hydrogen-web
use optional chaining
This commit is contained in:
parent
a90cebcabb
commit
79363ed1d7
1 changed files with 2 additions and 2 deletions
|
@ -76,8 +76,8 @@ export function iterateCursor(cursorRequest, processValue) {
|
|||
return; // end of results
|
||||
}
|
||||
const result = processValue(cursor.value, cursor.key);
|
||||
const done = result && result.done;
|
||||
const jumpTo = result && result.jumpTo;
|
||||
const done = result?.done;
|
||||
const jumpTo = result?.jumpTo;
|
||||
|
||||
if (done) {
|
||||
resolve(true);
|
||||
|
|
Loading…
Reference in a new issue