mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-06 13:46:42 +02:00
Fix this
reference for JavaScript functions (#38725)
This commit is contained in:
committed by
GitHub
parent
74891cb3a6
commit
16d80a4ff7
@@ -320,7 +320,7 @@ class Dropdown extends BaseComponent {
|
||||
|
||||
return {
|
||||
...defaultBsPopperConfig,
|
||||
...execute(this._config.popperConfig, [defaultBsPopperConfig])
|
||||
...execute(this._config.popperConfig, [undefined, defaultBsPopperConfig])
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -392,7 +392,7 @@ class Tooltip extends BaseComponent {
|
||||
}
|
||||
|
||||
_resolvePossibleFunction(arg) {
|
||||
return execute(arg, [this._element])
|
||||
return execute(arg, [this._element, this._element])
|
||||
}
|
||||
|
||||
_getPopperConfig(attachment) {
|
||||
@@ -438,7 +438,7 @@ class Tooltip extends BaseComponent {
|
||||
|
||||
return {
|
||||
...defaultBsPopperConfig,
|
||||
...execute(this._config.popperConfig, [defaultBsPopperConfig])
|
||||
...execute(this._config.popperConfig, [undefined, defaultBsPopperConfig])
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -223,7 +223,7 @@ const defineJQueryPlugin = plugin => {
|
||||
}
|
||||
|
||||
const execute = (possibleCallback, args = [], defaultValue = possibleCallback) => {
|
||||
return typeof possibleCallback === 'function' ? possibleCallback(...args) : defaultValue
|
||||
return typeof possibleCallback === 'function' ? possibleCallback.call(...args) : defaultValue
|
||||
}
|
||||
|
||||
const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {
|
||||
|
@@ -143,7 +143,7 @@ class TemplateFactory extends Config {
|
||||
}
|
||||
|
||||
_resolvePossibleFunction(arg) {
|
||||
return execute(arg, [this])
|
||||
return execute(arg, [undefined, this])
|
||||
}
|
||||
|
||||
_putElementInTemplate(element, templateElement) {
|
||||
|
Reference in New Issue
Block a user