fix(runtime-core): ensure renderCache always exists
This commit is contained in:
		
							parent
							
								
									028f748c32
								
							
						
					
					
						commit
						8383e5450e
					
				| @ -114,7 +114,7 @@ export interface ComponentInternalInstance { | |||||||
|   accessCache: Data | null |   accessCache: Data | null | ||||||
|   // cache for render function values that rely on _ctx but won't need updates
 |   // cache for render function values that rely on _ctx but won't need updates
 | ||||||
|   // after initialized (e.g. inline handlers)
 |   // after initialized (e.g. inline handlers)
 | ||||||
|   renderCache: (Function | VNode)[] | null |   renderCache: (Function | VNode)[] | ||||||
| 
 | 
 | ||||||
|   // assets for fast resolution
 |   // assets for fast resolution
 | ||||||
|   components: Record<string, Component> |   components: Record<string, Component> | ||||||
| @ -192,7 +192,7 @@ export function createComponentInstance( | |||||||
|     effects: null, |     effects: null, | ||||||
|     provides: parent ? parent.provides : Object.create(appContext.provides), |     provides: parent ? parent.provides : Object.create(appContext.provides), | ||||||
|     accessCache: null!, |     accessCache: null!, | ||||||
|     renderCache: null, |     renderCache: [], | ||||||
| 
 | 
 | ||||||
|     // setup context properties
 |     // setup context properties
 | ||||||
|     renderContext: EMPTY_OBJ, |     renderContext: EMPTY_OBJ, | ||||||
|  | |||||||
| @ -51,7 +51,6 @@ const publicPropertiesMap: Record< | |||||||
| > = { | > = { | ||||||
|   $: i => i, |   $: i => i, | ||||||
|   $el: i => i.vnode.el, |   $el: i => i.vnode.el, | ||||||
|   $cache: i => i.renderCache || (i.renderCache = []), |  | ||||||
|   $data: i => i.data, |   $data: i => i.data, | ||||||
|   $props: i => i.propsProxy, |   $props: i => i.propsProxy, | ||||||
|   $attrs: i => i.attrs, |   $attrs: i => i.attrs, | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user