Skip to content

Commit

Permalink
Check if clear() is defined when using clearOptions (#554)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjaros committed Dec 28, 2024
1 parent 708963b commit b2e69c1
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,9 @@ open class TomSelectInput(
open fun clearOptions() {
if (tomSelectJs != null) {
tomSelectJs!!.clearOptions()
tomSelectJs.asDynamic().input.clear()
if (tomSelectJs.asDynamic().input != undefined && tomSelectJs.asDynamic().input.clear != undefined) {
tomSelectJs.asDynamic().input.clear()
}
}
}

Expand Down

0 comments on commit b2e69c1

Please sign in to comment.