diff options
| -rw-r--r-- | lib/basic-contract/viewer/basic-contract-sign-viewer.tsx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/basic-contract/viewer/basic-contract-sign-viewer.tsx b/lib/basic-contract/viewer/basic-contract-sign-viewer.tsx index f21eac38..54e9c18c 100644 --- a/lib/basic-contract/viewer/basic-contract-sign-viewer.tsx +++ b/lib/basic-contract/viewer/basic-contract-sign-viewer.tsx @@ -1204,10 +1204,10 @@ export function BasicContractSignViewer({ : targetFile.path; const encodedPath = normalizedPath.split("/").map(encodeURIComponent).join("/"); const apiFilePath = `/api/files/${encodedPath}`; + const shouldForceReload = currentDocumentPath.current !== apiFilePath; - try { - currentDocumentPath.current = ""; - await loadDocument(currentInstance, apiFilePath, true); + try { + await loadDocument(currentInstance, apiFilePath, shouldForceReload); setIsInitialLoaded(true); const { documentViewer } = currentInstance.Core; @@ -1243,8 +1243,6 @@ export function BasicContractSignViewer({ const encodedPath = normalizedPath.split('/').map(part => encodeURIComponent(part)).join('/'); const apiFilePath = `/api/files/${encodedPath}`; - currentDocumentPath.current = ""; - loadDocument(currentInstance, apiFilePath, true).then(() => { setIsInitialLoaded(true); }).catch((error) => { |
