Repository navigation
Commit c1a34b1
fix(docs-layout): untrack headings write too, same self-cycle risk
The headings $effect had the same shape as the breadcrumb effect: it
writes `headings = extractHeadings(contentElement)` from inside an
`$effect`, and Svelte 5's `$state` assignment reads the current value
to dedupe equal writes. That hidden read would subscribe the effect
to its own write and re-fire on every doc page.
Same `untrack` fix. Compute `next` outside, write inside `untrack`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent f000296 commit c1a34b1
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
187 | 194 | | |
188 | 195 | | |
189 | 196 | | |
| |||
0 commit comments