File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,26 @@ export const createComponent = (
19
19
export const createComponentWithFallback = (
20
20
type : VaporComponent | typeof Fragment ,
21
21
...args : Tail < Parameters < typeof _createComponentWithFallback > >
22
- ) => createProxyComponent ( _createComponentWithFallback , type , ...args )
22
+ ) => {
23
+ const slots = args [ 1 ]
24
+ if (
25
+ typeof type === 'string' &&
26
+ slots &&
27
+ slots . default &&
28
+ typeof slots . default === 'function'
29
+ ) {
30
+ const defaultSlot = slots . default
31
+ slots . default = ( ) => {
32
+ return createProxyComponent (
33
+ _createComponentWithFallback ,
34
+ defaultSlot ,
35
+ null ,
36
+ null ,
37
+ )
38
+ }
39
+ }
40
+ return createProxyComponent ( _createComponentWithFallback , type , ...args )
41
+ }
23
42
24
43
const createProxyComponent = (
25
44
createComponent :
You can’t perform that action at this time.
0 commit comments