cleanup
This commit is contained in:
@@ -61,7 +61,7 @@ interface DocumentViewerPanelProps extends DocumentSummarySectionProps {
|
||||
contentType?: string | null;
|
||||
filename?: string | null;
|
||||
} | null;
|
||||
ensureAssetUrl?: (docId: string | number, asset: AssetLike, options?: { start?: number; limit?: number }) => Promise<unknown>;
|
||||
ensureAssetUrl?: (docId: string | number, asset: AssetLike, options?: { force?: boolean }) => Promise<unknown>;
|
||||
getDocumentAsset?: (doc: DocumentLike | null, type: string) => AssetLike | null;
|
||||
ensurePreviewData?: (docId: string | number, options?: { signal?: AbortSignal }) => Promise<DocumentLike | null>;
|
||||
resolveApiPath?: (path: string) => string;
|
||||
@@ -210,7 +210,7 @@ const DocumentViewerPanel: React.FC<DocumentViewerPanelProps> = ({
|
||||
let url = updateUrl();
|
||||
|
||||
if (!url && document.id && asset?.id && ensureAssetUrl) {
|
||||
await ensureAssetUrl(document.id, asset, { start: 1, limit: 1 });
|
||||
await ensureAssetUrl(document.id, asset, { force: true });
|
||||
if (signal?.aborted) {
|
||||
throw new DOMException('Aborted', 'AbortError');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user