fix routing bug in side drawer

This commit is contained in:
hzrd149 2023-10-20 07:30:08 -05:00
parent de1268a8e3
commit ae3ef94c17

View File

@ -100,7 +100,7 @@ export default function DrawerSubViewProvider({
(to: To) => {
const newRouter = createMemoryRouter(routes, { initialEntries: [to] });
newRouter.subscribe((e) => {
if (!!e.errors?.["__shim-error-route__"]) {
if (e.errors && e.errors[0].status === 404 && e.errors[0].internal) {
openInParent(e.location);
}
});