fix(runtime-core): ensure raw slot function is only normalized once (#5358)
fix: #5343
This commit is contained in:
		
							parent
							
								
									8e31765fd3
								
							
						
					
					
						commit
						e4dffe900a
					
				@ -63,6 +63,10 @@ const normalizeSlot = (
 | 
				
			|||||||
  rawSlot: Function,
 | 
					  rawSlot: Function,
 | 
				
			||||||
  ctx: ComponentInternalInstance | null | undefined
 | 
					  ctx: ComponentInternalInstance | null | undefined
 | 
				
			||||||
): Slot => {
 | 
					): Slot => {
 | 
				
			||||||
 | 
					  if ((rawSlot as any)._n) {
 | 
				
			||||||
 | 
					    // already normalized - #5353
 | 
				
			||||||
 | 
					    return rawSlot as Slot
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
  const normalized = withCtx((...args: any[]) => {
 | 
					  const normalized = withCtx((...args: any[]) => {
 | 
				
			||||||
    if (__DEV__ && currentInstance) {
 | 
					    if (__DEV__ && currentInstance) {
 | 
				
			||||||
      warn(
 | 
					      warn(
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user