From 4df8d72b79140919c14df103b45bbc8b1afa37c2 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Thu, 20 Nov 2025 09:25:44 +0000
Subject: (임수민) 서명란 에러 수정
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/basic-contract/viewer/basic-contract-sign-viewer.tsx | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

(limited to 'lib/basic-contract/viewer/basic-contract-sign-viewer.tsx')

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) => {
-- 
cgit v1.2.3

