Skip to content

Commit

Permalink
Fix #7489: ScrollPanel defend against NULL ref
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Dec 30, 2024
1 parent 5ae4498 commit bc3d330
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions components/lib/scrollpanel/ScrollPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export const ScrollPanel = React.forwardRef((inProps, ref) => {
};

const moveBar = () => {
if (!contentRef.current) return;
// horizontal scroll
const totalWidth = contentRef.current.scrollWidth;
const ownWidth = contentRef.current.clientWidth;
Expand Down

0 comments on commit bc3d330

Please sign in to comment.