mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
use optional chaining
This commit is contained in:
parent
a90cebcabb
commit
79363ed1d7
@ -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 New Issue
Block a user