fix(compiler): only generate non-static ref for script setup if the binding exists
fix #4431
This commit is contained in:
		
							parent
							
								
									168a17ad8a
								
							
						
					
					
						commit
						3628991906
					
				@ -465,7 +465,12 @@ export function buildProps(
 | 
				
			|||||||
        // in inline mode there is no setupState object, so we can't use string
 | 
					        // in inline mode there is no setupState object, so we can't use string
 | 
				
			||||||
        // keys to set the ref. Instead, we need to transform it to pass the
 | 
					        // keys to set the ref. Instead, we need to transform it to pass the
 | 
				
			||||||
        // acrtual ref instead.
 | 
					        // acrtual ref instead.
 | 
				
			||||||
        if (!__BROWSER__ && context.inline) {
 | 
					        if (
 | 
				
			||||||
 | 
					          !__BROWSER__ &&
 | 
				
			||||||
 | 
					          value &&
 | 
				
			||||||
 | 
					          context.inline &&
 | 
				
			||||||
 | 
					          context.bindingMetadata[value.content]
 | 
				
			||||||
 | 
					        ) {
 | 
				
			||||||
          isStatic = false
 | 
					          isStatic = false
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user