mirror of https://github.com/vuejs/vitepress
dcb7a755 turned hasActiveLink from a computed into a ref fed only by a
non-immediate watch and onMounted, so is-active/has-active stopped
rendering in static HTML. This broke pre-hydration sidebar highlighting
and the docsearch crawler's lvl0 selector (section.has-active div h2),
which has indexed every record as the defaultValue since then.
Run the update once during setup with the hash check skipped: the server
and the client's initial render compute identical path-only state, so
hydration stays clean; the watch and onMounted refine with the real hash
after mount.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pull/5391/head
parent
b0da3845f8
commit
005aa5c3e8
Loading…
Reference in new issue