Skip to content

Commit

Permalink
ScrollComponent: remove unnecessary variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Sychic committed Oct 13, 2023
1 parent bc63165 commit b5bc9ba
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ class ScrollComponent constructor(
if (Window.of(this).version >= ElementaVersion.v5) {
// new behavior
val scrollDirection = if (!UKeyboard.isShiftKeyDown()) primaryScrollDirection else secondaryScrollDirection
scrollDirection?.let { direction ->
if (onScroll(it.delta.toFloat(), isHorizontal = direction == Direction.Horizontal) || !passthroughScroll) {
if (scrollDirection != null) {
if (onScroll(it.delta.toFloat(), isHorizontal = scrollDirection == Direction.Horizontal) || !passthroughScroll) {
it.stopPropagation()
}
}
Expand Down

0 comments on commit b5bc9ba

Please sign in to comment.