diff --git a/lib/ruby_ui/combobox/combobox_controller.js b/lib/ruby_ui/combobox/combobox_controller.js index 0dd4531a..7e233164 100644 --- a/lib/ruby_ui/combobox/combobox_controller.js +++ b/lib/ruby_ui/combobox/combobox_controller.js @@ -25,7 +25,7 @@ export default class extends Controller { } disconnect() { - this.cleanup(); + if (this.cleanup) { this.cleanup() } } inputChanged(e) { @@ -41,7 +41,7 @@ export default class extends Controller { } inputContent(input) { - return input.dataset.text || input.parentElement.innerText + return input.dataset.text || input.parentElement.textContent } toggleAllItems() {