File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -271,8 +271,8 @@ const Document = forwardRef(function Document(
271271
272272 const pages = useRef < HTMLDivElement [ ] > ( [ ] ) ;
273273
274- const prevFile = useRef < File > ( ) ;
275- const prevOptions = useRef < Options > ( ) ;
274+ const prevFile = useRef < File | undefined > ( undefined ) ;
275+ const prevOptions = useRef < Options | undefined > ( undefined ) ;
276276
277277 useEffect ( ( ) => {
278278 if ( file && file !== prevFile . current && isParameterObject ( file ) ) {
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export default function TextLayer() {
4040 const [ textContentState , textContentDispatch ] = useResolver < TextContent > ( ) ;
4141 const { value : textContent , error : textContentError } = textContentState ;
4242 const layerElement = useRef < HTMLDivElement > ( null ) ;
43- const endElement = useRef < HTMLElement > ( ) ;
43+ const endElement = useRef < HTMLElement | undefined > ( undefined ) ;
4444
4545 warning (
4646 parseInt (
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { useRef } from 'react';
55import { isDefined } from '../utils.js' ;
66
77export default function useCachedValue < T > ( getter : ( ) => T ) : ( ) => T {
8- const ref = useRef < T > ( ) ;
8+ const ref = useRef < T | undefined > ( undefined ) ;
99
1010 const currentValue = ref . current ;
1111
You can’t perform that action at this time.
0 commit comments