menu/dropdown: minor fixes

This commit is contained in:
bordun 2020-10-03 18:41:21 +02:00
parent 9f6bab467c
commit a01153da61
2 changed files with 15 additions and 5 deletions

View file

@ -50,7 +50,7 @@ class MenuBase extends Widget {
i = this.selected
if (i > -1 && string) {
this.text.innerHTML = iconify(string.replace(/%value/g, JSON.stringify(this.value)).replace(/%key/g, this.keys[i]))
this.text.innerHTML = iconify(String(string).replace(/%value/g, JSON.stringify(this.value)).replace(/%key/g, this.keys[i]))
} else {
this.text.innerHTML = ''
}