Skip to content

Commit 302342a

Browse files
committed
Fix tag indexing
1 parent fc87bbf commit 302342a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

packages/electric-db-collection/src/tag-index.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,8 @@ export function findRowsMatchingPattern(
145145
index: TagIndex
146146
): Set<RowId> {
147147
const { position, value } = getPositionalValue(pattern)
148-
// the index for this position exists
149-
// because we initialize the index with the right length
150-
// as soon as we know the tag length (i.e. when we first receive a tag)
151-
const positionIndex = index[position]!
152-
const rowSet = positionIndex.get(value)
148+
const positionIndex = index[position]
149+
const rowSet = positionIndex?.get(value)
153150
return rowSet ?? new Set()
154151
}
155152

0 commit comments

Comments
 (0)