|
@@ -235,7 +235,9 @@ export const Page = (props) => {
|
|
|
}, [mutateRendererOptions]);
|
|
}, [mutateRendererOptions]);
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
- mutateCurrentPageTocNode(tocRef.current);
|
|
|
|
|
|
|
+ if (tocRef.current != null) {
|
|
|
|
|
+ mutateCurrentPageTocNode(tocRef.current);
|
|
|
|
|
+ }
|
|
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
|
}, [mutateCurrentPageTocNode, tocRef.current]); // include tocRef.current to call mutateCurrentPageTocNode when tocRef.current changes
|
|
}, [mutateCurrentPageTocNode, tocRef.current]); // include tocRef.current to call mutateCurrentPageTocNode when tocRef.current changes
|
|
|
|
|
|