diff options
| author | XhmikosR <[email protected]> | 2020-11-25 09:45:36 +0200 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2020-11-30 12:07:51 +0200 |
| commit | 03ed3e0b3b0ed3449e24bf9694d3868cbde19c80 (patch) | |
| tree | b26f79ed5f65adaa48eded4bdbda6ccf098df2c3 /js | |
| parent | dd992c722625a48d534a3a1e8c6edee38e91685d (diff) | |
| download | bootstrap-03ed3e0b3b0ed3449e24bf9694d3868cbde19c80.tar.xz bootstrap-03ed3e0b3b0ed3449e24bf9694d3868cbde19c80.zip | |
tooltip.js: reuse existent variable
Diffstat (limited to 'js')
| -rw-r--r-- | js/src/tooltip.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/src/tooltip.js b/js/src/tooltip.js index a04739b7f..62b338839 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -584,8 +584,8 @@ class Tooltip extends BaseComponent { if (title || originalTitleType !== 'string') { this._element.setAttribute('data-bs-original-title', title || '') - if (this._element.getAttribute('title') && !this._element.getAttribute('aria-label') && !this._element.textContent) { - this._element.setAttribute('aria-label', this._element.getAttribute('title')) + if (title && !this._element.getAttribute('aria-label') && !this._element.textContent) { + this._element.setAttribute('aria-label', title) } this._element.setAttribute('title', '') |
