typescript
This commit is contained in:
@@ -190,7 +190,7 @@ const DocumentViewerPanel: React.FC<DocumentViewerPanelProps> = ({
|
||||
],
|
||||
);
|
||||
|
||||
const loadOcrContent = useCallback(async ({ signal } = {}) => {
|
||||
const loadOcrContent = useCallback(async ({ signal }: { signal?: AbortSignal } = {}) => {
|
||||
if (!document || !hasOcr || typeof getDocumentAsset !== 'function') {
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ export const useViewerLayoutMode = (
|
||||
|
||||
measure();
|
||||
|
||||
if (!('ResizeObserver' in window)) {
|
||||
if (typeof ResizeObserver === 'undefined') {
|
||||
window.addEventListener('resize', measure);
|
||||
return () => {
|
||||
if (frame) {
|
||||
|
||||
Reference in New Issue
Block a user