mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-24 16:14:01 +08:00
fix(scroll-region): top:0 or height:0 are valid for scrollToRect [sentry]
This commit is contained in:
parent
99f6749488
commit
373d224f0c
1 changed files with 1 additions and 1 deletions
|
@ -210,7 +210,7 @@ class ScrollRegion extends React.Component
|
|||
scrollToRect: (rect, {position, settle, done} = {}) ->
|
||||
if rect instanceof Node
|
||||
throw new Error("ScrollRegion.scrollToRect: requires a rect. Maybe you meant scrollTo?")
|
||||
if not rect.top or not rect.height
|
||||
if not rect.top? or not rect.height?
|
||||
throw new Error("ScrollRegion.scrollToRect: requires a rect with `top` and `height` attributes.")
|
||||
@_scroll {position, settle, done}, => rect
|
||||
|
||||
|
|
Loading…
Reference in a new issue