File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
packages/core/src/lib/components/layout Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 64
64
style ="height: {linesHeights [lineIndex ]}px;"
65
65
class ="msm__line-number {component .type }"
66
66
>
67
- {#if lineIndex == 0 && ! disableMerging && component .sideAction }
67
+ {#if lineIndex == 0 && ! disableMerging && component .sideAction && dispatch !== undefined }
68
68
<svelte:component
69
69
this ={component .sideAction .component }
70
- {...component .sideAction .props }
71
- {component }
72
- {dispatch }
70
+ {...{ ...component .sideAction .props , dispatch , component }}
73
71
/>
72
+ <!--
73
+ ☝️ The weird spread is needed due to a Svelte bug affecting the use of
74
+ `<svelte:component>` with spread props and normal ones in v4.
75
+ See here for more details: https://github.com/sveltejs/svelte/issues/9177
76
+ -->
74
77
{/if }
75
78
76
79
<pre >{startingLineNumber + lineIndex }</pre >
Original file line number Diff line number Diff line change 110
110
{#each sideComponents as blockComponent }
111
111
<svelte:component
112
112
this ={blockComponent .component }
113
- component ={blockComponent }
114
- {...blockComponent .props }
113
+ {...{ ...blockComponent .props , component: blockComponent }}
115
114
/>
115
+ <!--
116
+ ☝️ The weird spread is needed due to a Svelte bug affecting the use of
117
+ `<svelte:component>` with spread props and normal ones in v4.
118
+ See here for more details: https://github.com/sveltejs/svelte/issues/9177
119
+ -->
116
120
{/each }
117
121
</div >
118
122
You can’t perform that action at this time.
0 commit comments