[Library | new-theme]: parsingFunctions.class.ts: [Bug fix] Stringify each downloadName and collectedFromName.

This commit is contained in:
Konstantina Galouni 2022-09-16 16:12:58 +03:00
parent 89e769f030
commit b373a53e34
1 changed files with 2 additions and 2 deletions

View File

@ -273,7 +273,7 @@ export class ParsingFunctions {
for (let i = 0; i < length; i++) {
let hostedBy = Array.isArray(instance['hostedby']) ? instance['hostedby'][i] : instance['hostedby'];
if (hostedBy.name && hostedBy.name != "other resources" && hostedBy.name != "Unknown Repository") {
downloadNames.add(hostedBy.name);
downloadNames.add(String(hostedBy.name));
}
}
available.downloadNames = Array.from(downloadNames);
@ -288,7 +288,7 @@ export class ParsingFunctions {
for (let i = 0; i < length; i++) {
let collectedFrom = Array.isArray(instance['collectedfrom']) ? instance['collectedfrom'][i] : instance['collectedfrom'];
if(collectedFrom.name && collectedFrom.id) {
available.collectedNamesAndIds.set(collectedFrom.name, collectedFrom.id);
available.collectedNamesAndIds.set(String(collectedFrom.name), collectedFrom.id);
}
}
}