Explorar o código

Fix error: TypeError: i is not a function (#4204)

Dan Wallis hai 1 ano
pai
achega
ad13dbff72
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      packages/alpinejs/src/directives/x-transition.js

+ 1 - 1
packages/alpinejs/src/directives/x-transition.js

@@ -173,7 +173,7 @@ window.Element.prototype._x_toggleAndCascadeWithTransitions = function (el, valu
                     let carry = Promise.all([
                         el._x_hidePromise,
                         ...(el._x_hideChildren || []).map(hideAfterChildren),
-                    ]).then(([i]) => i())
+                    ]).then(([i]) => i?.())
 
                     delete el._x_hidePromise
                     delete el._x_hideChildren