fix wanakana toggle on empty input
This commit is contained in:
parent
68179607b3
commit
d62d04f806
@ -69,7 +69,7 @@ class DisplaySearch extends Display {
|
|||||||
this.wanakanaEnable.checked = false;
|
this.wanakanaEnable.checked = false;
|
||||||
}
|
}
|
||||||
this.wanakanaEnable.addEventListener('change', (e) => {
|
this.wanakanaEnable.addEventListener('change', (e) => {
|
||||||
let query = DisplaySearch.getSearchQueryFromLocation(window.location.href);
|
const query = DisplaySearch.getSearchQueryFromLocation(window.location.href) || '';
|
||||||
if (e.target.checked) {
|
if (e.target.checked) {
|
||||||
window.wanakana.bind(this.query);
|
window.wanakana.bind(this.query);
|
||||||
this.query.value = window.wanakana.toKana(query);
|
this.query.value = window.wanakana.toKana(query);
|
||||||
|
Loading…
Reference in New Issue
Block a user