diff options
| author | Factiven <[email protected]> | 2023-11-18 10:04:17 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-11-18 10:04:17 +0700 |
| commit | d8630f8011dab6c81aee0abbd74d88b2e0176d33 (patch) | |
| tree | b72a73ff1695df43464a02249b10f8fe7a443277 /pages | |
| parent | Update [id].js (diff) | |
| download | moopa-pre-v4.3.0.tar.xz moopa-pre-v4.3.0.zip | |
Update pre-v4.3.0 - Merged Branch pre-push-prev4.3.0 to main (#98)pre-v4.3.0
* Update pre-v4.3.0
* Update aniAdvanceSearch.js
Diffstat (limited to 'pages')
| -rw-r--r-- | pages/en/manga/[...id].js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pages/en/manga/[...id].js b/pages/en/manga/[...id].js index 6d2b016..5648b2c 100644 --- a/pages/en/manga/[...id].js +++ b/pages/en/manga/[...id].js @@ -254,7 +254,7 @@ export async function getServerSideProps(context) { const datas = await getAnifyInfo(mangadexId); aniId = - datas.mappings.filter((i) => i.providerId === "anilist")[0]?.id || null; + datas.mappings?.filter((i) => i.providerId === "anilist")[0]?.id || null; if (!aniId) { info = datas; @@ -363,7 +363,7 @@ export async function getServerSideProps(context) { data = await getAnifyInfo(mangadexId); const aniListId = - data.mappings.filter((i) => i.providerId === "anilist")[0]?.id || null; + data.mappings?.filter((i) => i.providerId === "anilist")[0]?.id || null; const response = await fetch("https://graphql.anilist.co/", { method: "POST", @@ -389,8 +389,7 @@ export async function getServerSideProps(context) { color: textColor, }; - if(redis) - { + if (redis) { await redis.set( `mangaPage:${mangadexId}`, JSON.stringify({ data, info, color }), |