From 79363ed1d74378fefb27e7f1e44ad1805e26e471 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 19 Aug 2020 18:25:38 +0200 Subject: [PATCH] use optional chaining --- src/matrix/storage/idb/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/matrix/storage/idb/utils.js b/src/matrix/storage/idb/utils.js index 75f2b08b..7cdc30fd 100644 --- a/src/matrix/storage/idb/utils.js +++ b/src/matrix/storage/idb/utils.js @@ -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);