Skip to content

Commit

Permalink
fix: always wrap loader return in json (remix-run#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey authored Mar 15, 2022
1 parent 40398d9 commit 9a9b3bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/routes/join.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { validateEmail } from "~/utils";
export const loader: LoaderFunction = async ({ request }) => {
const userId = await getUserId(request);
if (userId) return redirect("/");
return null;
return json({});
};

interface ActionData {
Expand Down
2 changes: 1 addition & 1 deletion app/routes/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { validateEmail } from "~/utils";
export const loader: LoaderFunction = async ({ request }) => {
const userId = await getUserId(request);
if (userId) return redirect("/");
return {};
return json({});
};

interface ActionData {
Expand Down

0 comments on commit 9a9b3bc

Please sign in to comment.