From f41981b32ae4832e58223f55c209fd112dfbede7 Mon Sep 17 00:00:00 2001 From: Filip Toman <31852506+Fry98@users.noreply.github.com> Date: Tue, 14 Sep 2021 17:11:40 +0200 Subject: [PATCH] fix: fix v-cloak on toggle (#71) --- src/app.ts | 4 ---- src/walk.ts | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app.ts b/src/app.ts index 0ed9d6c..b497756 100644 --- a/src/app.ts +++ b/src/app.ts @@ -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 }, diff --git a/src/walk.ts b/src/walk.ts index fbdeb46..e7de0d5 100644 --- a/src/walk.ts +++ b/src/walk.ts @@ -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