소스 검색

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