From f04cd130a38eccfd6c3511dfcc482cff105f9868 Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Thu, 21 Sep 2023 11:06:51 -0400 Subject: [PATCH] Ensure null exports don't fail --- packages/remix-react/routes.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/remix-react/routes.tsx b/packages/remix-react/routes.tsx index dda100f6476..85fcc3f35de 100644 --- a/packages/remix-react/routes.tsx +++ b/packages/remix-react/routes.tsx @@ -226,7 +226,7 @@ async function loadRouteModuleWithBlockingLinks( // ignore those when setting the Component let defaultExportIsEmptyObject = typeof routeModule.default === "object" && - Object.keys(routeModule.default).length === 0; + Object.keys(routeModule.default || {}).length === 0; // Include all `browserSafeRouteExports` fields return {