Skip to content

Commit

Permalink
fix: TypeError: Cannot read properties of undefined (reading 'viewport'
Browse files Browse the repository at this point in the history
infiniflow#1761 (infiniflow#1784)

### What problem does this PR solve?

fix: TypeError: Cannot read properties of undefined (reading 'viewport'
infiniflow#1761

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
  • Loading branch information
cike8899 authored Aug 2, 2024
1 parent e1983d8 commit 834b76b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const Preview = ({ highlights: state, setWidthAndHeight }: IProps) => {

useEffect(() => {
if (state.length > 0) {
ref.current(state[0]);
ref?.current(state[0]);
}
}, [state]);

Expand Down

0 comments on commit 834b76b

Please sign in to comment.