[object Object]

← back to Forza

guard diary TOC builder against missing #toc-list element

e823c46050ba200750ea57f15dc3ed6c43530443 · 2026-05-18 20:19:37 -0700 · SteveStudio2

Files touched

Diff

commit e823c46050ba200750ea57f15dc3ed6c43530443
Author: SteveStudio2 <steve@designerwallcoverings.com>
Date:   Mon May 18 20:19:37 2026 -0700

    guard diary TOC builder against missing #toc-list element
---
 diary/index.html | 1 +
 1 file changed, 1 insertion(+)

diff --git a/diary/index.html b/diary/index.html
index 4fac455..05958ae 100644
--- a/diary/index.html
+++ b/diary/index.html
@@ -338,6 +338,7 @@
   // Build the left-hand index from every .entry on the page
   (function(){
     const list = document.getElementById('toc-list');
+    if (!list) return;
     const entries = document.querySelectorAll('.entry[data-toc]');
     entries.forEach(section => {
       const title = section.getAttribute('data-toc');

← e57c787 add missing viewport meta to root index.html  ·  back to Forza  ·  broaden .gitignore env pattern to .env.* per standing rule 8d4f567 →