Skip to content

TypeError: Cannot read properties of undefined (reading 'result') when redirecting before fetcher finished loading #13442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
a1r93 opened this issue Apr 22, 2025 · 2 comments

Comments

@a1r93
Copy link

a1r93 commented Apr 22, 2025

I'm using React Router as a...

framework

Reproduction

  • Go to https://stackblitz.com/edit/github-mhvzvdkl
  • Click on the first button to load the data
  • Before the load ends, click on the second button that will submit a form and redirect the user
  • Open the console to see the following error
Image

System Info

System:
    OS: macOS 14.5
    CPU: (10) arm64 Apple M1 Pro
    Memory: 64.88 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
Binaries:
    Node: 22.11.0 - ~/.nvm/versions/node/v22.11.0/bin/node
    Yarn: 1.22.22 - ~/Library/pnpm/yarn
    npm: 10.9.0 - ~/.nvm/versions/node/v22.11.0/bin/npm
    pnpm: 10.7.0 - ~/Library/pnpm/pnpm
    bun: 1.0.29 - ~/.bun/bin/bun
Browsers:
    Brave Browser: 122.1.63.169
    Chrome: 135.0.7049.96
    Edge: 135.0.3179.85
    Safari: 17.5

Used Package Manager

pnpm

Expected Behavior

No error should pop in the console

Actual Behavior

There is a "Cannot read properties of undefined" error

@omarkhatibco
Copy link

I'm have the same issue after upgrading to v7.5.2 but it's when the loader has a redirect

@brophdawg11
Copy link
Contributor

This is fixed by #13521 and will be available in the next release

@brophdawg11 brophdawg11 added the awaiting release This issue has been fixed and will be released soon label May 2, 2025
@brophdawg11 brophdawg11 removed their assignment May 2, 2025
@brophdawg11 brophdawg11 removed the awaiting release This issue has been fixed and will be released soon label May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants