Просмотр исходного кода

Merge pull request #10582 from growilabs/fix/175487-getserversidepropsfor-initial-is-not-executed-when-transitioning-from-outside-route

fix: getServerSidePropsForInitial is not executed when transitioning from outside route
Yuki Takei 5 месяцев назад
Родитель
Сommit
d16a9c04f6
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),
   );
 };