Skip to content

+page.svelte in deepest route is not getting errors prop  #6264

Closed
@pilcrowonpaper

Description

@pilcrowonpaper

Describe the bug

I tried to open a new PR but I even can't get a fresh fork to pass tests so I'm opening a new issue

For a very simple project like so:

/+page.svelte

the "route pyramid" in root.svelte looks like this:

{#if components[1]}
	<svelte:component this={components[0]} data={data_0}>
		<svelte:component this={components[1]} data={data_1}/>
	</svelte:component>
{:else}
	<svelte:component this={components[0]} data={data_0} {errors} />
{/if}

and the deepest page component is missing the errors prop. The problem is in /src/core/sync/write_root.js:

let pyramid = `<svelte:component this={components[${l}]} data={data_${l}}/>`;

should be fixed to

let pyramid = `<svelte:component this={components[${l}]} data={data_${l}} {errors}/>`;

Reproduction

.

Logs

No response

System Info

.

Severity

serious, but I can work around it

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions