Repository navigation
Commit f000296
fix(docs-layout): break the breadcrumb effect self-cycle in DocsLayoutV2
Svelte 5's `$state` proxy reads the existing value during a `set` to
dedupe equal writes. Inside an `$effect`, that hidden read subscribes
the effect to the property it's writing — so the breadcrumb assignment
`breadcrumbContext.breadcrumbs = buildCrumbs(...)` made the effect
observe its own writes and re-fire, blowing up as
`effect_update_depth_exceeded` on every doc-page hydration.
Wrap the write in `untrack`. Compute the next value outside `untrack`
so the legitimate dependency on `page.url.pathname` still flows
through.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 23451a3 commit f000296
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
106 | 113 | | |
107 | 114 | | |
108 | 115 | | |
109 | 116 | | |
110 | 117 | | |
111 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
112 | 122 | | |
113 | 123 | | |
114 | 124 | | |
| |||
0 commit comments