aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/search-query-parser.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/search-query-parser.js')
-rw-r--r--ext/bg/js/search-query-parser.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/bg/js/search-query-parser.js b/ext/bg/js/search-query-parser.js
index 2aee45dd..14b78105 100644
--- a/ext/bg/js/search-query-parser.js
+++ b/ext/bg/js/search-query-parser.js
@@ -122,7 +122,7 @@ class QueryParser {
async setPreview(text) {
const previewTerms = [];
- while (text) {
+ while (text.length > 0) {
const tempText = text.slice(0, 2);
previewTerms.push([{text: Array.from(tempText)}]);
text = text.slice(2);