You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a fetcher submitting to an action handler that returns null then getFetcherType returns idle after submission instead of done.
This happens because the initial fetcher.data value is undefined, but in the code if (fetcher.state === "idle" && fetcher.data != null) return "done", fetcher.data is being checked for null
Describe the bug
If a fetcher submitting to an
action
handler that returnsnull
thengetFetcherType
returnsidle
after submission instead ofdone
.This happens because the initial
fetcher.data
value isundefined
, but in the code if (fetcher.state === "idle" && fetcher.data != null) return "done",fetcher.data
is being checked fornull
Your Example Website or App
https://stackblitz.com/edit/remix-run-remix-hpas2u?file=app%2Froutes%2F_index.tsx
Steps to Reproduce the Bug or Issue
Expected behavior
If fetcher is triggering
action
which returningnull
value,getFetcherType
should bedone
, notidle
Screenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: