some small js option fixes

This commit is contained in:
REJack
2019-11-17 11:53:47 +01:00
parent f5286d6229
commit e24c4d01ff
11 changed files with 42 additions and 30 deletions

View File

@@ -246,9 +246,10 @@ const ControlSidebar = (($) => {
static _jQueryInterface(operation) {
return this.each(function () {
let data = $(this).data(DATA_KEY)
const _options = $.extend({}, Default, $(this).data())
if (!data) {
data = new ControlSidebar(this, $(this).data())
data = new ControlSidebar(this, _options)
$(this).data(DATA_KEY, data)
}