فهرست منبع

support custom walker in destroyTree

Caleb Porzio 1 سال پیش
والد
کامیت
bf36275d96
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      packages/alpinejs/src/lifecycle.js

+ 2 - 2
packages/alpinejs/src/lifecycle.js

@@ -102,8 +102,8 @@ export function initTree(el, walker = walk, intercept = () => {}) {
     })
     })
 }
 }
 
 
-export function destroyTree(root) {
-    walk(root, el => {
+export function destroyTree(root, walker = walk) {
+    walker(root, el => {
         cleanupAttributes(el)
         cleanupAttributes(el)
         cleanupElement(el)
         cleanupElement(el)