Skip to content

Commit f41981b

Browse files
authored
fix: fix v-cloak on toggle (#71)
1 parent 771a666 commit f41981b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/app.ts

-4
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,6 @@ export const createApp = (initialData?: any) => {
7878
}
7979

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

src/walk.ts

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ export const walk = (node: Node, ctx: Context): ChildNode | null | void => {
2323
return
2424
}
2525

26+
checkAttr(el, 'v-cloak')
27+
2628
let exp: string | null
2729

2830
// v-if

0 commit comments

Comments
 (0)