From 677d1092a56957103d827f21e2e27fedb41dd4ce Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Fri, 24 Oct 2025 11:05:03 +0000
Subject: (임수민) SecurePdfViewer 오류 수정
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 components/file-manager/SecurePDFViewer.tsx | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'components/file-manager/SecurePDFViewer.tsx')

diff --git a/components/file-manager/SecurePDFViewer.tsx b/components/file-manager/SecurePDFViewer.tsx
index a24e2e37..704c4f24 100644
--- a/components/file-manager/SecurePDFViewer.tsx
+++ b/components/file-manager/SecurePDFViewer.tsx
@@ -192,11 +192,11 @@ export function SecurePDFViewer({ documentUrl, fileName, category, onClose }: Se
 
       const { documentViewer, annotationManager } = instance.Core;
 
-      if (category !== 'public') {
-        // 문서 로드 완료 이벤트
-        documentViewer.addEventListener('documentLoaded', async () => {
-          setIsLoading(false);
+      // 문서 로드 완료 이벤트
+      documentViewer.addEventListener('documentLoaded', async () => {
+        setIsLoading(false);
 
+        if (category !== 'public') {
           // 워터마크 추가
           const watermarkText = `SHI DATAROOM\n${session?.user?.email || 'CONFIDENTIAL'}\n${new Date().toLocaleString()}`;
 
-- 
cgit v1.2.3

