Skip to content

Lack of synchronization of locals #17382

Description

@devcustrom

Astro Info

Astro                    v7.0.9
Node                     v22.22.1
System                   Windows (x64)
Package Manager          pnpm
Output                   server
Adapter                  @astrojs/node
Integrations             @astrojs/vue

If this issue only occurs in one browser, which browser is a problem?

Node

Describe the Bug

In the reproduction repository, you need to open two pages, '/pageGetNotFound/?crutch=true' and '/pageGetNotFound/', which trigger the rendering of the 404 page, and see that the data passed in locals in fetch.ts is not passed to the error page's renderer unless you add 'state.renderOptions.locals = state.locals;'

What's the expected result?

I expect that I don't need to manually synchronize locals and renderOptions.locals

Link to Minimal Reproducible Example

https://github.com/devcustrom/astro-pinia-bug

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions