Skip to content

Commit 30fe5a0

Browse files
fix: migrate ConsoleLine to svelte 5 to show the right count for duplicate logs (#1434)
* fix: migrate `ConsoleLine` to svelte 5 to show the right count for duplicate logs * chore: make log normal prop Co-authored-by: Rich Harris <rich.harris@vercel.com> --------- Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 parent 1694a6e commit 30fe5a0

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

packages/repl/src/lib/Output/console/ConsoleLine.svelte

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
<script lang="ts">
2+
import ConsoleLine from './ConsoleLine.svelte';
23
import JSONNode from '@sveltejs/svelte-json-tree';
34
import ConsoleTable from './ConsoleTable.svelte';
45
import type { Log } from './Log.svelte';
56
6-
export let log: Log;
7-
export let depth = 0;
7+
interface Props {
8+
log: Log;
9+
depth?: number;
10+
}
11+
12+
let { log, depth = 0 }: Props = $props();
813
914
function toggle_group_collapse() {
1015
log.collapsed = !log.collapsed;
@@ -182,7 +187,7 @@
182187

183188
{#if log.command === 'group' && !log.collapsed}
184189
{#each log.logs ?? [] as childLog}
185-
<svelte:self log={childLog} depth={depth + 1} />
190+
<ConsoleLine log={childLog} depth={depth + 1} />
186191
{/each}
187192
{/if}
188193

0 commit comments

Comments
 (0)