From ebd3579ece647734a452c6af2f7a8671287ecb5d Mon Sep 17 00:00:00 2001 From: Andrew Dunkman Date: Fri, 26 Jan 2018 10:54:27 -0500 Subject: [PATCH] Remove nonsensical if-statement. --- coffee/chosen.jquery.coffee | 2 +- coffee/chosen.proto.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/coffee/chosen.jquery.coffee b/coffee/chosen.jquery.coffee index 2487de3d8f0..4d0e35d8882 100644 --- a/coffee/chosen.jquery.coffee +++ b/coffee/chosen.jquery.coffee @@ -198,7 +198,7 @@ class Chosen extends AbstractChosen if @is_multiple @search_choices.find("li.search-choice").remove() - else if not @is_multiple + else this.single_set_selected_text() if @disable_search or @form_field.options.length <= @disable_search_threshold @search_field[0].readOnly = true diff --git a/coffee/chosen.proto.coffee b/coffee/chosen.proto.coffee index 14fb32da04c..5c7eefac498 100644 --- a/coffee/chosen.proto.coffee +++ b/coffee/chosen.proto.coffee @@ -191,7 +191,7 @@ class @Chosen extends AbstractChosen if @is_multiple @search_choices.select("li.search-choice").invoke("remove") - else if not @is_multiple + else this.single_set_selected_text() if @disable_search or @form_field.options.length <= @disable_search_threshold @search_field.readOnly = true