Browse Source

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

Dan Wallis 1 year ago
parent
commit
ad13dbff72
1 changed files with 1 additions and 1 deletions
  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