Skip to content
Source
Sign inSign up
TanStack/query

fix(core): do not rely on dataUpdatedAt truthiness #7008

MergedTkDodomerged 4 commits intomain fromrefs/pull/7008/headmerged by TkDodo View on GitHub

TkDodocommented

if we want to check for "hasData", we should rather look at state.data and check it against undefined, because it's not possible to have a successful query with data being undefined (since v4)

fixes #7003

    1. The latest updates on your projects. Learn more about Vercel for Git ↗︎

      1 Ignored Deployment
      NameStatusPreviewCommentsUpdated (UTC)
      query⬜️ Ignored (Inspect)Visit PreviewMar 2, 2024 8:23pm
    2. ☁️ Nx Cloud Report

      CI is running/has finished running commands for commit ef2cd3fe912139a2bc1f6f7e47bb23aea9e42528. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

      📂 See all runs for this CI Pipeline Execution


      ✅ Successfully ran 1 target

    3. Sent with 💌 from NxCloud.

  • This pull request is automatically built and testable in CodeSandbox.

    To see build info of the built libraries, click here or the icon next to each commit SHA.

    Latest deployment of this branch, based on commit ef2cd3fe912139a2bc1f6f7e47bb23aea9e42528:

    SandboxSource
    @tanstack/query-example-angular-basicConfiguration
    @tanstack/query-example-react-basic-typescriptConfiguration
    @tanstack/query-example-solid-basic-typescriptConfiguration
    @tanstack/query-example-svelte-basicConfiguration
    @tanstack/query-example-vue-basicConfiguration
  • TkDodo merged this3191ae8

  • TkDodo closed this

  • Sign in to join this conversation.