File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
packages/svelte/src/internal Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -322,8 +322,11 @@ export function unmount(component) {
322
322
* @returns {Record<string, any> }
323
323
*/
324
324
export function sanitize_slots ( props ) {
325
- const sanitized = { ...props . $$slots } ;
326
- if ( props . children ) sanitized . default = props . children ;
325
+ /** @type {Record<string, boolean> } */
326
+ const sanitized = { } ;
327
+ for ( const key in props . $$slots ) {
328
+ sanitized [ key ] = true ;
329
+ }
327
330
return sanitized ;
328
331
}
329
332
Original file line number Diff line number Diff line change @@ -555,8 +555,11 @@ export function sanitize_props(props) {
555
555
* @returns {Record<string, any> }
556
556
*/
557
557
export function sanitize_slots ( props ) {
558
- const sanitized = { ...props . $$slots } ;
559
- if ( props . children ) sanitized . default = props . children ;
558
+ /** @type {Record<string, boolean> } */
559
+ const sanitized = { } ;
560
+ for ( const key in props . $$slots ) {
561
+ sanitized [ key ] = true ;
562
+ }
560
563
return sanitized ;
561
564
}
562
565
You can’t perform that action at this time.
0 commit comments