2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-15 11:59:39 +03:00

tooltip.js: reuse existent variable

This commit is contained in:
XhmikosR
2020-11-25 09:45:36 +02:00
parent dd992c7226
commit 03ed3e0b3b
+2 -2
View File
@@ -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', '')