Skip to content

Commit

Permalink
fix: fix v-cloak on toggle (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fry98 committed Sep 14, 2021
1 parent 771a666 commit f41981b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/app.ts
Expand Up @@ -78,10 +78,6 @@ export const createApp = (initialData?: any) => {
}

rootBlocks = roots.map((el) => new Block(el, ctx, true))
// remove all v-cloak after mount
;[el, ...el.querySelectorAll(`[v-cloak]`)].forEach((el) =>
el.removeAttribute('v-cloak')
)
return this
},

Expand Down
2 changes: 2 additions & 0 deletions src/walk.ts
Expand Up @@ -23,6 +23,8 @@ export const walk = (node: Node, ctx: Context): ChildNode | null | void => {
return
}

checkAttr(el, 'v-cloak')

let exp: string | null

// v-if
Expand Down

0 comments on commit f41981b

Please sign in to comment.