Commit 52b1e15
authored
Return 404 when Hadith data is empty or missing (#3201)
* fix: handle empty hadiths data in getStaticProps
Added a check in getStaticProps to return a notFound response if the hadiths data is empty, ensuring proper handling of cases where no hadiths are available for the requested chapter.
* refactor: simplify empty hadiths check in getStaticProps1 parent cfa46db commit 52b1e15
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
122 | 124 | | |
123 | 125 | | |
124 | 126 | | |
| |||
0 commit comments