Skip to content

[persist-client-core] Query data of value "null" is not restored #9658

@fl0ydj

Description

@fl0ydj

Describe the bug

In

a != null check is performed, which results in null values not being resolved from the persisted cache.

Happy to create a PR to change this to !== undefined

Your minimal, reproducible example

Steps to reproduce

See code

Expected behavior

null is a valid return value for a queryFn and therefore should also be resolved here?

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

All

Tanstack Query adapter

None

TanStack Query version

5.87.4

TypeScript version

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions