Skip to content

Commit

Permalink
Added SSDF document and fixed document list logic
Browse files Browse the repository at this point in the history
Made the document list a bit more bulletproof.  If a filename or title have any trailing spaces, the list builder thought it was a new document and created a new entry in the list.
  • Loading branch information
randywoods1 committed Jan 6, 2025
1 parent dabf5e8 commit 97cb7a2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,17 @@ export class ReferencesDisplayComponent implements OnInit {
const list: ReferenceDocLink[] = [];

docList?.forEach(ref => {
ref.fileName = ref.fileName?.trim();
ref.title = ref.title?.trim();
ref.url = ref.url?.trim();

let listDoc: ReferenceDocLink = list.find(d => d.fileName == ref.fileName && d.title == ref.title);
if (!listDoc) {
listDoc = {
fileId: ref.fileId,
fileName: ref.fileName?.trim(),
title: ref.title?.trim(),
url: ref.url?.trim(),
fileName: ref.fileName,
title: ref.title,
url: ref.url,
isUploaded: ref.isUploaded,
bookmarks: []
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { ResourceLibraryService } from '../../../services/resource-library.servi
})
export class ReferencesSectionComponent {

@Input() documents;
@Input() documents: any[];

@Input('q')
question: any;
Expand Down

0 comments on commit 97cb7a2

Please sign in to comment.