Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion reflex/.templates/web/utils/client_side_routing.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ export const useClientSideRouting = () => {
router.replace({
pathname: window.location.pathname,
query: window.location.search.slice(1),
})
}).then(()=>{
// Check if the current route is /404
if (router.pathname === '/404') {
setRouteNotFound(true); // Mark as an actual 404
}
})
.catch((e) => {
setRouteNotFound(true) // navigation failed, so this is a real 404
})
Expand Down