Skip to content

Commit

Permalink
Improve assignment of 'multiselect' data attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
s-eckard committed Oct 8, 2021
1 parent 65d2300 commit 86843ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions dist/js/bootstrap-multiselect.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@
this.synchronizeButtonAndPopupWidth();
}

$(this).data('multiselect', data);
this.options.onInitialized(this.$select, this.$container);
}

Expand Down Expand Up @@ -1997,16 +1998,11 @@
// Initialize the multiselect.
if (!data) {
data = new Multiselect(this, options);
$(this).data('multiselect', data);
}

// Call multiselect method.
if (typeof option === 'string') {
data[option](parameter, extraOptions);

if (option === 'destroy') {
$(this).data('multiselect', false);
}
}
});
};
Expand Down
Loading

0 comments on commit 86843ae

Please sign in to comment.