fix(Slider): forcePopupAlign null when unmounted (#28699)

This commit is contained in:
Yann Pringault 2021-01-05 14:50:07 +01:00 committed by GitHub
parent 6cab21dc02
commit 1409db1923
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,7 @@ const SliderTooltip = React.forwardRef<unknown, TooltipProps>((props, ref) => {
function keepAlign() {
rafRef.current = raf(() => {
innerRef.current.forcePopupAlign();
innerRef.current?.forcePopupAlign();
rafRef.current = null;
keepAlign();
});