Skip to content

Commit 5074e44

Browse files
committed
fix: Reset PDF state on dialog open
1 parent 48bd265 commit 5074e44

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tools/server/webui/src/lib/components/app/chat/ChatAttachments/ChatAttachmentPreviewDialog.svelte

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,15 @@
134134
}
135135
}
136136
137+
$effect(() => {
138+
if (open) {
139+
pdfImages = [];
140+
pdfImagesLoading = false;
141+
pdfImagesError = null;
142+
pdfViewMode = 'pages';
143+
}
144+
});
145+
137146
$effect(() => {
138147
if (open && isPdf && pdfViewMode === 'pages') {
139148
loadPdfImages();

0 commit comments

Comments
 (0)