Skip to content

Commit 6f28e41

Browse files
adigubadummdidumm
andauthored
chore: tidy up scrolling code logic (#11630)
--------- Co-authored-by: Simon H <[email protected]>
1 parent 87a420f commit 6f28e41

File tree

1 file changed

+1
-3
lines changed
  • packages/svelte/src/internal/client/dom/elements/bindings

1 file changed

+1
-3
lines changed

packages/svelte/src/internal/client/dom/elements/bindings/window.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ export function bind_window_scroll(type, get_value, update) {
3333

3434
render_effect(() => {
3535
latest_value = get_value();
36-
if (latest_value === undefined) return;
37-
38-
if (!scrolling) {
36+
if (!scrolling && latest_value != null) {
3937
scrolling = true;
4038
clearTimeout(timeout);
4139
if (is_scrolling_x) {

0 commit comments

Comments
 (0)