Skip to content

Commit 0de71e7

Browse files
authored
Merge pull request orbitdb-archive#15 from orbitdb/fix/keynotfound
Make sure to check that the entry exists when returning the payload
2 parents 886d58a + e2da97c commit 0de71e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DocumentIndex.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class DocumentIndex {
88
get (key, fullOp = false) {
99
return fullOp
1010
? this._index[key]
11-
: this._index[key].payload.value
11+
: this._index[key] ? this._index[key].payload.value : null
1212
}
1313

1414
updateIndex (oplog, onProgressCallback) {

0 commit comments

Comments
 (0)