Skip to content

Commit 5f1392c

Browse files
committed
Ignore null server data
1 parent 4e6996c commit 5f1392c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/builder/app/routes/_ui.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ export const clientLoader = async ({
7777
serverLoader,
7878
}: ClientLoaderFunctionArgs) => {
7979
const serverData = await serverLoader<typeof loader>();
80-
console.log(serverData);
80+
// client loader is invoked twice with server data and with null
81+
if (!serverData) {
82+
return;
83+
}
8184

8285
if (clientCsrfToken === undefined) {
8386
const { csrfToken } = serverData;

0 commit comments

Comments
 (0)