Skip to content

Commit

Permalink
fix(ObjectPage): fix crash when unmounted ObjectPage tries to asynchr…
Browse files Browse the repository at this point in the history
…onously set scrollbar height (#294)
  • Loading branch information
vbersch authored Jan 28, 2020
1 parent 134f083 commit 7ed965e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/main/src/components/ObjectPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ const ObjectPage: FC<ObjectPagePropTypes> = forwardRef((props: ObjectPagePropTyp
heightDiff = heightDiff > 0 ? heightDiff : 0;
fillerDivDomRef.current.style.height = `${heightDiff}px`;
requestAnimationFrame(() => {
if(!contentScrollContainer.current || !topHeader.current) return;
const scrollbarContainerHeight =
contentScrollContainer.current.getBoundingClientRect().height +
topHeader.current.getBoundingClientRect().height;
Expand Down

0 comments on commit 7ed965e

Please sign in to comment.