Skip to content
This repository was archived by the owner on Sep 30, 2023. It is now read-only.

Commit f894316

Browse files
phillmacaphelionz
authored andcommitted
Ensure doc is defined before accessing properties
1 parent 5d9c121 commit f894316

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
@@ -15,7 +15,7 @@ class DocumentIndex {
1515
const reducer = (handled, item, idx) => {
1616
if (item.payload.op === 'PUTALL' && item.payload.docs[Symbol.iterator]) {
1717
for (const doc of item.payload.docs) {
18-
if (handled[doc.key] !== true) {
18+
if (doc && handled[doc.key] !== true) {
1919
handled[doc.key] = true
2020
this._index[doc.key] = {
2121
payload: {

0 commit comments

Comments
 (0)