const _config = {
...Default,
...Manipulator.getDataAttributes(element),
- ...typeof config === 'object' && config ? config : {}
+ ...(typeof config === 'object' && config ? config : {})
}
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
offset.fn = data => {
data.offsets = {
...data.offsets,
- ...this._config.offset(data.offsets, this._element) || {}
+ ...(this._config.offset(data.offsets, this._element) || {})
}
return data
const _config = {
...Default,
...Manipulator.getDataAttributes(this),
- ...typeof config === 'object' && config ? config : {}
+ ...(typeof config === 'object' && config ? config : {})
}
if (!data) {
_getConfig(config) {
config = {
...Default,
- ...typeof config === 'object' && config ? config : {}
+ ...(typeof config === 'object' && config ? config : {})
}
if (typeof config.target !== 'string' && isElement(config.target)) {
config = {
...Default,
...Manipulator.getDataAttributes(this._element),
- ...typeof config === 'object' && config ? config : {}
+ ...(typeof config === 'object' && config ? config : {})
}
typeCheckConfig(NAME, config, this.constructor.DefaultType)
offset.fn = data => {
data.offsets = {
...data.offsets,
- ...this.config.offset(data.offsets, this.element) || {}
+ ...(this.config.offset(data.offsets, this.element) || {})
}
return data
config = {
...this.constructor.Default,
...dataAttributes,
- ...typeof config === 'object' && config ? config : {}
+ ...(typeof config === 'object' && config ? config : {})
}
if (typeof config.delay === 'number') {