@@ -49,15 +49,20 @@ if (isVue3) {
49
49
const originalRender = definition . render
50
50
definition . __alreadyPatched = true
51
51
definition . render = function ( h ) {
52
- const patchedH = function ( tag , dataObjOrChildren , ...rest ) {
52
+ const patchedH = function ( tag , dataObjOrChildren , rawSlots ) {
53
+ const slots =
54
+ rawSlots === undefined
55
+ ? [ ]
56
+ : [ Array . isArray ( rawSlots ) ? rawSlots . filter ( Boolean ) : rawSlots ]
57
+
53
58
const isTag = typeof tag === 'string' && ! KNOWN_COMPONENTS . includes ( tag )
54
59
const isSecondArgumentDataObject =
55
60
dataObjOrChildren &&
56
61
typeof dataObjOrChildren === 'object' &&
57
62
! Array . isArray ( dataObjOrChildren )
58
63
59
64
if ( ! isSecondArgumentDataObject ) {
60
- return h ( tag , dataObjOrChildren , ...rest )
65
+ return h ( tag , dataObjOrChildren , ...slots )
61
66
}
62
67
63
68
const { attrs, props, ...restData } = dataObjOrChildren
@@ -70,7 +75,7 @@ if (isVue3) {
70
75
// terrible workaround to fix router-link rendering with compat vue-router
71
76
normalizedData . scopedSlots = { $hasNormal : ( ) => { } }
72
77
}
73
- return h ( tag , normalizedData , ...rest )
78
+ return h ( tag , normalizedData , ...slots )
74
79
}
75
80
76
81
if ( definition . functional ) {
0 commit comments