Jelajahi Sumber

fix: correct server-side props handling for route transitions

Shun Miyazawa 4 bulan lalu
induk
melakukan
0e37fa6579
1 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 3 3
      apps/app/src/pages/[[...path]]/index.page.tsx

+ 3 - 3
apps/app/src/pages/[[...path]]/index.page.tsx

@@ -277,9 +277,9 @@ export const getServerSideProps: GetServerSideProps<Props> = async (
   // Merge all results in a type-safe manner (using sequential merging)
   return mergeGetServerSidePropsResults(
     commonEachPropsResult,
-    nextjsRoutingType === NextjsRoutingType.INITIAL
-      ? await getServerSidePropsForInitial(context)
-      : await getServerSidePropsForSameRoute(context),
+    nextjsRoutingType === NextjsRoutingType.SAME_ROUTE
+      ? await getServerSidePropsForSameRoute(context)
+      : await getServerSidePropsForInitial(context)
   );
 };