Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Commit

Permalink
fix(Modal): Add guard to scrollToTop (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hurshal Patel authored Jan 31, 2020
1 parent e15a4c7 commit 0c613eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Modal/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function Modal({ children, title, animationDuration, showClose, onClose,
};

const scrollToTop = () => {
if (modalRef.current) {
if (modalRef.current && modalRef.current.scroll) {
modalRef.current.scroll(0, 0);
}
};
Expand Down

0 comments on commit 0c613eb

Please sign in to comment.