Skip to content

Commit

Permalink
support custom walker in destroyTree
Browse files Browse the repository at this point in the history
  • Loading branch information
calebporzio committed Feb 4, 2024
1 parent 4e17130 commit bf36275
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/alpinejs/src/lifecycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
cleanupElement(el)

Expand Down

0 comments on commit bf36275

Please sign in to comment.