We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ed446dc + 9e63172 commit 6e01e4eCopy full SHA for 6e01e4e
coffee/chosen.jquery.coffee
@@ -8,9 +8,11 @@ $.fn.extend({
8
this.each (input_field) ->
9
$this = $ this
10
chosen = $this.data('chosen')
11
- if options is 'destroy' && chosen instanceof Chosen
12
- chosen.destroy()
13
- else unless chosen instanceof Chosen
+ if options is 'destroy'
+ if chosen instanceof Chosen
+ chosen.destroy()
14
+ return
15
+ unless chosen instanceof Chosen
16
$this.data('chosen', new Chosen(this, options))
17
18
return
0 commit comments