From 9c8999a3ae602141ec85d140f8458387afe3e467 Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Tue, 25 Mar 2025 19:04:31 +0530 Subject: [PATCH] (fix:sources) doc selection for preLoaded --- frontend/src/components/SourcesPopup.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/SourcesPopup.tsx b/frontend/src/components/SourcesPopup.tsx index 611b7c81..0da27718 100644 --- a/frontend/src/components/SourcesPopup.tsx +++ b/frontend/src/components/SourcesPopup.tsx @@ -143,13 +143,16 @@ export default function SourcesPopup({ {option.name}
- {selectedDocs && selectedDocs.id === option.id && ( + {selectedDocs && + (option.id ? + selectedDocs.id === option.id : // For documents with MongoDB IDs + selectedDocs.date === option.date) && // For preloaded sources Selected - )} + }
);