Skip to content

Commit

Permalink
Don't try to tokenize null body
Browse files Browse the repository at this point in the history
  • Loading branch information
singpolyma committed Nov 26, 2024
1 parent ef25fac commit 7350a86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion snikket/persistence/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ const browser = (dbname, tokenize, stemmer) => {
cursor.onsuccess = (event) => {
if (event.target.result) {
const value = event.target.result.value;
if (new Set(tokenize(value.text).map(stemmer)).isSupersetOf(qTok)) {
if (value.text && new Set(tokenize(value.text).map(stemmer)).isSupersetOf(qTok)) {
if (!callback(q, hydrateMessageSync(value))) return;
}
event.target.result.continue();
Expand Down

0 comments on commit 7350a86

Please sign in to comment.