Skip to content

Commit 8383e54

Browse files
committed
fix(runtime-core): ensure renderCache always exists
1 parent 028f748 commit 8383e54

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/runtime-core/src/component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export interface ComponentInternalInstance {
114114
accessCache: Data | null
115115
// cache for render function values that rely on _ctx but won't need updates
116116
// after initialized (e.g. inline handlers)
117-
renderCache: (Function | VNode)[] | null
117+
renderCache: (Function | VNode)[]
118118

119119
// assets for fast resolution
120120
components: Record<string, Component>
@@ -192,7 +192,7 @@ export function createComponentInstance(
192192
effects: null,
193193
provides: parent ? parent.provides : Object.create(appContext.provides),
194194
accessCache: null!,
195-
renderCache: null,
195+
renderCache: [],
196196

197197
// setup context properties
198198
renderContext: EMPTY_OBJ,

packages/runtime-core/src/componentProxy.ts

-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ const publicPropertiesMap: Record<
5151
> = {
5252
$: i => i,
5353
$el: i => i.vnode.el,
54-
$cache: i => i.renderCache || (i.renderCache = []),
5554
$data: i => i.data,
5655
$props: i => i.propsProxy,
5756
$attrs: i => i.attrs,

0 commit comments

Comments
 (0)