Make options an optional parameter

js_style_fix
Tim Chen 2011-08-04 09:18:40 -05:00
parent 90ca300921
commit f9674e7db2
3 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@
}); });
Chosen = (function() { Chosen = (function() {
function Chosen(elmn, options) { function Chosen(elmn, options) {
this.set_default_values(options); this.set_default_values(options || {});
this.form_field = elmn; this.form_field = elmn;
this.form_field_jq = $(this.form_field); this.form_field_jq = $(this.form_field);
this.is_multiple = this.form_field.multiple; this.is_multiple = this.form_field.multiple;

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,7 @@ $.fn.extend({
class Chosen class Chosen
constructor: (elmn, options) -> constructor: (elmn, options) ->
this.set_default_values(options) this.set_default_values(options or {})
@form_field = elmn @form_field = elmn
@form_field_jq = $ @form_field @form_field_jq = $ @form_field