Merge pull request '修复撤下 Endor 导航后历史页面的空值访问' (#53) from codex/archived-doc-render into main
Verify and deploy Tabularium / verify-and-deploy (push) Failing after 11m26s

Reviewed-on: #53
This commit was merged in pull request #53.
This commit is contained in:
2026-11-05 14:29:52 +00:00
+2 -1
View File
@@ -58,7 +58,8 @@ export default function DocPage({
const [active, setActive] = useState("");
const siblings = docs.filter((d) => d.collection === doc.collection);
const collectionEntry = collectionEntries(docs).find((c) => c.name === doc.collection)!.entry;
// Historical pages remain readable even when their collection is outside the catalog.
const collectionEntry = collectionEntries(docs).find((c) => c.name === doc.collection)?.entry ?? doc;
const index = siblings.findIndex((d) => d.slug === doc.slug);
useEffect(() => {
const observer = new IntersectionObserver(