remove error from x rank page creating

This commit is contained in:
Kalle (Sendou)
2020-11-18 15:57:36 +02:00
parent 03aca1a414
commit 0689cc2c41

View File

@@ -49,7 +49,7 @@ export const getStaticPaths: GetStaticPaths = async () => {
orderBy: [{ month: "desc" }, { year: "desc" }],
});
if (!mostRecentResult) throw Error("No X Rank Placements");
if (!mostRecentResult) return { paths: [], fallback: true };
return {
paths: getMonthOptions(mostRecentResult.month, mostRecentResult.year)