mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-22 02:04:22 +01:00
docs: share fix scroll to anchor
This commit is contained in:
@@ -957,7 +957,12 @@ export default function Share(props: {
|
|||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
const hash = window.location.hash.slice(1)
|
const hash = window.location.hash.slice(1)
|
||||||
if (hash !== "" && hash === anchor()) {
|
// Wait till all parts are loaded
|
||||||
|
if (
|
||||||
|
hash !== ""
|
||||||
|
&& msg.parts.length === partIndex() + 1
|
||||||
|
&& data().messages.length === msgIndex() + 1
|
||||||
|
) {
|
||||||
scrollToAnchor(hash)
|
scrollToAnchor(hash)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user