(tryPath, pageMap, redirects)
| 193 | } |
| 194 | |
| 195 | function findPage(tryPath, pageMap, redirects) { |
| 196 | if (pageMap[tryPath]) { |
| 197 | return { |
| 198 | title: pageMap[tryPath].title, |
| 199 | path: tryPath, |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | const redirect = getRedirect(tryPath, { redirects, pages: pageMap }) |
| 204 | if (pageMap[redirect]) { |
| 205 | return { |
| 206 | title: pageMap[redirect].title, |
| 207 | path: redirect, |
| 208 | } |
| 209 | } |
| 210 | } |