File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed 
packages/server-renderer/src Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change 44  ComponentInternalInstance , 
55  DirectiveBinding , 
66  Fragment , 
7+   FunctionalComponent , 
78  mergeProps , 
89  ssrUtils , 
910  Static , 
@@ -112,12 +113,17 @@ function renderComponentSubTree(
112113  const  comp  =  instance . type  as  Component 
113114  const  {  getBuffer,  push }  =  createBuffer ( ) 
114115  if  ( isFunction ( comp ) )  { 
115-     renderVNode ( 
116-       push , 
117-       ( instance . subTree  =  renderComponentRoot ( instance ) ) , 
118-       instance , 
119-       slotScopeId 
120-     ) 
116+     let  root  =  renderComponentRoot ( instance ) 
117+     // #5817 scope ID attrs not falling through if functional component doesn't 
118+     // have props 
119+     if  ( ! ( comp  as  FunctionalComponent ) . props )  { 
120+       for  ( const  key  in  instance . attrs )  { 
121+         if  ( key . startsWith ( `data-v-` ) )  { 
122+           ; ( root . props  ||  ( root . props  =  { } ) ) [ key ]  =  `` 
123+         } 
124+       } 
125+     } 
126+     renderVNode ( push ,  ( instance . subTree  =  root ) ,  instance ,  slotScopeId ) 
121127  }  else  { 
122128    if  ( 
123129      ( ! instance . render  ||  instance . render  ===  NOOP )  && 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments