Skip to content

Warning 'useAsyncData must return a value (it should not be undefined) (...)' triggered for server route returning null or '' #28920

@DamianGlowala

Description

@DamianGlowala

Environment

n/a

Reproduction

https://stackblitz.com/edit/github-9s3uba

Describe the bug

Warning 'useAsyncData must return a value (it should not be undefined) or the request may be duplicated on the client side.' occurs when calling server route which returns null or ''.

Additional context

Mentioned in #28096 (comment)

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions