mirror of
https://github.com/withastro/astro.git
synced 2025-03-31 23:31:30 -05:00
Fixes an TypeError when using without (#10456)
This commit is contained in:
parent
8a80dbfdde
commit
1900a8f9bc
2 changed files with 6 additions and 1 deletions
5
.changeset/thirty-dancers-wink.md
Normal file
5
.changeset/thirty-dancers-wink.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"astro": patch
|
||||
---
|
||||
|
||||
Fixes an error when using `astro:transtions/client` without `<ViewTransitions/>`
|
|
@ -622,7 +622,7 @@ const onScrollEnd = () => {
|
|||
// "scrollend" events. To avoid redundant work and expensive calls to
|
||||
// `replaceState()`, we simply check that the values are different before
|
||||
// updating.
|
||||
if (scrollX !== history.state.scrollX || scrollY !== history.state.scrollY) {
|
||||
if (history.state && (scrollX !== history.state.scrollX || scrollY !== history.state.scrollY)) {
|
||||
updateScrollPosition({ scrollX, scrollY });
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue