aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/bg/js/search.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js
index 75707e6c..08c02624 100644
--- a/ext/bg/js/search.js
+++ b/ext/bg/js/search.js
@@ -312,7 +312,14 @@ class DisplaySearch extends Display {
}
setQuery(query) {
- const interpretedQuery = this.isWanakanaEnabled() ? wanakana.toKana(query) : query;
+ let interpretedQuery = query;
+ if (this.isWanakanaEnabled()) {
+ try {
+ interpretedQuery = wanakana.toKana(query);
+ } catch (e) {
+ // NOP
+ }
+ }
this.query.value = interpretedQuery;
this.queryParser.setText(interpretedQuery);
}