### What problem does this PR solve? fix: TypeError: Cannot read properties of undefined (reading 'viewport' #1761 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)tags/v0.9.0
| @@ -41,7 +41,7 @@ const Preview = ({ highlights: state, setWidthAndHeight }: IProps) => { | |||
| useEffect(() => { | |||
| if (state.length > 0) { | |||
| ref.current(state[0]); | |||
| ref?.current(state[0]); | |||
| } | |||
| }, [state]); | |||