summaryrefslogtreecommitdiff
path: root/ext/bg
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2019-10-27 23:52:16 +0200
committersiikamiika <siikamiika@users.noreply.github.com>2019-10-27 23:52:16 +0200
commitd62d04f806d2e6e5f2c3ac69a7d62f00cc31bd1b (patch)
treec3b2c343b966590b8f4d07e4882ca7c202f475f6 /ext/bg
parent68179607b3ac8ed34f32a4a7699fb95c7826249b (diff)
fix wanakana toggle on empty input
Diffstat (limited to 'ext/bg')
-rw-r--r--ext/bg/js/search.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js
index 65cca002..dbfcb15d 100644
--- a/ext/bg/js/search.js
+++ b/ext/bg/js/search.js
@@ -69,7 +69,7 @@ class DisplaySearch extends Display {
this.wanakanaEnable.checked = false;
}
this.wanakanaEnable.addEventListener('change', (e) => {
- let query = DisplaySearch.getSearchQueryFromLocation(window.location.href);
+ const query = DisplaySearch.getSearchQueryFromLocation(window.location.href) || '';
if (e.target.checked) {
window.wanakana.bind(this.query);
this.query.value = window.wanakana.toKana(query);