Преглед изворни кода

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

Dan Wallis пре 1 година
родитељ
комит
ad13dbff72
1 измењених фајлова са 1 додато и 1 уклоњено
  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