@@ -19,6 +19,7 @@ import {
19
19
setupComponent
20
20
} from './component'
21
21
import {
22
+ filterSingleRoot ,
22
23
renderComponentRoot ,
23
24
shouldUpdateComponent ,
24
25
updateHOCHostEl
@@ -746,30 +747,6 @@ function baseCreateRenderer(
746
747
}
747
748
// scopeId
748
749
setScopeId ( el , scopeId , vnode , parentComponent )
749
- // if (scopeId) {
750
- // hostSetScopeId(el, scopeId)
751
- // }
752
- // if (parentComponent) {
753
- // const treeOwnerId = parentComponent.type.__scopeId
754
- // // vnode's own scopeId and the current patched component's scopeId is
755
- // // different - this is a slot content node.
756
- // if (treeOwnerId && treeOwnerId !== scopeId) {
757
- // hostSetScopeId(el, treeOwnerId + '-s')
758
- // }
759
- // const parentScopeId =
760
- // vnode === parentComponent.subTree && parentComponent.vnode.scopeId
761
- // if (parentScopeId) {
762
- // hostSetScopeId(el, parentScopeId)
763
- // if (parentComponent.parent) {
764
- // const treeOwnerId = parentComponent.parent.type.__scopeId
765
- // // vnode's own scopeId and the current patched component's scopeId is
766
- // // different - this is a slot content node.
767
- // if (treeOwnerId && treeOwnerId !== parentScopeId) {
768
- // hostSetScopeId(el, treeOwnerId + '-s')
769
- // }
770
- // }
771
- // }
772
- // }
773
750
}
774
751
if ( __DEV__ || __FEATURE_PROD_DEVTOOLS__ ) {
775
752
Object . defineProperty ( el , '__vnode' , {
@@ -823,7 +800,12 @@ function baseCreateRenderer(
823
800
if ( treeOwnerId && treeOwnerId !== scopeId ) {
824
801
hostSetScopeId ( el , treeOwnerId + '-s' )
825
802
}
826
- if ( vnode === parentComponent . subTree ) {
803
+ let subTree = parentComponent . subTree
804
+ if ( __DEV__ && subTree . type === Fragment ) {
805
+ subTree =
806
+ filterSingleRoot ( subTree . children as VNodeArrayChildren ) || subTree
807
+ }
808
+ if ( vnode === subTree ) {
827
809
setScopeId (
828
810
el ,
829
811
parentComponent . vnode . scopeId ,
0 commit comments