]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Tooltip: Remove redundant `config.delay` check
authorGeoSot <geo.sotis@gmail.com>
Sun, 28 Nov 2021 01:06:15 +0000 (03:06 +0200)
committerXhmikosR <xhmikosr@gmail.com>
Wed, 1 Dec 2021 16:00:36 +0000 (18:00 +0200)
`config.delay` is always an object after initialization

js/src/tooltip.js

index 3027b8f4c64d2b1614b8014406e29217679cf2d4..ccec08ddacb02f4c528dc23c70cb500da4ff5a90 100644 (file)
@@ -528,7 +528,7 @@ class Tooltip extends BaseComponent {
 
     context._hoverState = HOVER_STATE_SHOW
 
-    if (!context._config.delay || !context._config.delay.show) {
+    if (!context._config.delay.show) {
       context.show()
       return
     }
@@ -557,7 +557,7 @@ class Tooltip extends BaseComponent {
 
     context._hoverState = HOVER_STATE_OUT
 
-    if (!context._config.delay || !context._config.delay.hide) {
+    if (!context._config.delay.hide) {
       context.hide()
       return
     }