summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/bg/js/backend.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index d5086af2..960c65bf 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -324,7 +324,7 @@ class Backend {
{},
options
);
- if (definitions.length > 0) {
+ if (definitions.length > 0 && sourceLength > 0) {
dictTermsSort(definitions);
const {expression, reading} = definitions[0];
const source = text.substring(0, sourceLength);