code-forge-io / code-forge-io/remix-toast

Double redirect results in no toast message

Open
#42 4 comments 3 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
262
Forks
16
PR merge metrics
No merged PRs in 30d

Description

After migrating to using toast middleware, we have a regression where we have some access controls in our loaders and redirect to parent routes if no access is allowed.

Our tests have picked up an edge case where a direct url is used to a deep page `/route/sub-route` which kicks the user back to `/route` if they don’t have access for that page either and immediately redirected for a second time to `/` then no toast is displayed.

Our code was using `return redirectWithError`, I have also tried to change to `return await redirectWithError ` and `throw await redirectWithError ` but neither seems to being the toast message back.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.