Browse Source

Remove unused variable

GitOrigin-RevId: 57b864aff3317513f981b101feafac28d3379403
Andrew Rumble 1 năm trước cách đây
mục cha
commit
ce3054713f

+ 4 - 4
services/web/frontend/js/features/tooltip/index-bs5.ts

@@ -21,8 +21,8 @@ if (footerLanguageElement) {
 
 
 const allTooltips = document.querySelectorAll('[data-bs-toggle="tooltip"]')
 const allTooltips = document.querySelectorAll('[data-bs-toggle="tooltip"]')
 allTooltips.forEach(element => {
 allTooltips.forEach(element => {
-  // eslint-disable-next-line no-unused-vars
-  const tooltip = new Tooltip(element)
+  // eslint-disable-next-line no-new
+  new Tooltip(element)
 })
 })
 
 
 const possibleBadgeTooltips = document.querySelectorAll('[data-badge-tooltip]')
 const possibleBadgeTooltips = document.querySelectorAll('[data-badge-tooltip]')
@@ -36,8 +36,8 @@ possibleBadgeTooltips.forEach(element => {
   if (element.parentElement) {
   if (element.parentElement) {
     const parentWidth = getElementWidth(element.parentElement)
     const parentWidth = getElementWidth(element.parentElement)
     if (element.scrollWidth > parentWidth) {
     if (element.scrollWidth > parentWidth) {
-      // eslint-disable-next-line no-unused-vars
-      const tooltip = new Tooltip(element)
+      // eslint-disable-next-line no-new
+      new Tooltip(element)
     } else {
     } else {
       element.parentElement.style.maxWidth = 'none'
       element.parentElement.style.maxWidth = 'none'
     }
     }