chore: warn NaN vnode key
This commit is contained in:
		
							parent
							
								
									d86b01ba3a
								
							
						
					
					
						commit
						31e37b417b
					
				@ -383,6 +383,11 @@ function _createVNode(
 | 
				
			|||||||
    appContext: null
 | 
					    appContext: null
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // validate key
 | 
				
			||||||
 | 
					  if (__DEV__ && vnode.key !== vnode.key) {
 | 
				
			||||||
 | 
					    warn(`VNode created with invalid key (NaN). VNode type:`, vnode.type)
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  normalizeChildren(vnode, children)
 | 
					  normalizeChildren(vnode, children)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // presence of a patch flag indicates this node needs patching on updates.
 | 
					  // presence of a patch flag indicates this node needs patching on updates.
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user