]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(runtime-core): initialize renderCache if not present
authorEvan You <yyx990803@gmail.com>
Thu, 12 Dec 2019 16:44:18 +0000 (11:44 -0500)
committerEvan You <yyx990803@gmail.com>
Fri, 13 Dec 2019 02:09:47 +0000 (21:09 -0500)
packages/runtime-core/src/componentProxy.ts

index 0638b9bd3c669bda6fa709cff9f93b8c7a278e5f..02629fdddc625cddee8df88435dc4587782d9037 100644 (file)
@@ -51,7 +51,7 @@ const publicPropertiesMap: Record<
 > = {
   $: i => i,
   $el: i => i.vnode.el,
-  $cache: i => i.renderCache,
+  $cache: i => i.renderCache || (i.renderCache = []),
   $data: i => i.data,
   $props: i => i.propsProxy,
   $attrs: i => i.attrs,