Skip to content

Commit 25afc4a

Browse files
committed
fix: prevent resolveCssVars from being called before component is mounted
1 parent 2475ea0 commit 25afc4a

File tree

1 file changed

+1
-6
lines changed
  • packages/runtime-vapor/src/dom

1 file changed

+1
-6
lines changed

packages/runtime-vapor/src/dom/prop.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -638,12 +638,7 @@ function resolveCssVars(
638638
block: Block,
639639
expectedMap: Map<string, string>,
640640
): void {
641-
if (__DEV__ && !instance.isMounted) {
642-
throw new Error(
643-
'resolveCssVars should NOT be called before component is mounted',
644-
)
645-
}
646-
641+
if (!instance.isMounted) return
647642
const rootBlocks = normalizeBlock(instance)
648643
if (
649644
(instance as GenericComponentInstance).getCssVars &&

0 commit comments

Comments
 (0)