@trendr/core 0.4.13 → 0.4.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/diff-view.js +3 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trendr/core",
3
- "version": "0.4.13",
3
+ "version": "0.4.14",
4
4
  "description": "direct-mode TUI renderer with JSX, signals, and per-cell diffing",
5
5
  "license": "MIT",
6
6
  "author": "Jonathan Pyers",
package/src/diff-view.js CHANGED
@@ -148,7 +148,9 @@ export function Diff({
148
148
  // inside a scrolled container and would swallow wheel events meant for it
149
149
  if (!hitTest(event.x, event.y)) return
150
150
  if (event.direction !== 'up' && event.direction !== 'down') return
151
- setOffset(clamp(clamped + (event.direction === 'up' ? -3 : 3)))
151
+ const next = clamp(clamped + (event.direction === 'up' ? -3 : 3))
152
+ if (next === clamped) return
153
+ setOffset(next)
152
154
  event.stopPropagation()
153
155
  })
154
156