소스 검색

fix: correct server-side props handling for route transitions

Shun Miyazawa 4 달 전
부모
커밋
0e37fa6579
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  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)
   );
 };