Merge pull request #3650 from Abderahman88/patch-3493

[react-rss-reader] Fix direct request service
This commit is contained in:
Hugo Bernier 2023-04-06 09:07:19 -04:00 committed by GitHub
commit da40b1d5c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 2 deletions

View File

@ -53,6 +53,7 @@ Version|Date|Comments
-------|----|--------
1.0.0 | Jan 21, 2019 | Initial release
1.0.1 | Nov 22, 2020 | Upgraded to SPFx 1.11
1.0.2 | April 6, 2023 | Fix bug in Direct request retrieval service
## Minimal Path to Awesome

View File

@ -3,7 +3,7 @@
"solution": {
"name": "react-rssreader-client-side-solution",
"id": "fcb53167-e0d5-4ed1-9648-149146649aa1",
"version": "1.0.1.0",
"version": "1.0.2.0",
"developer": {
"name": "Eric Overfield",
"privacyUrl": "https://contoso.com/privacy",

View File

@ -198,7 +198,12 @@ export class RssXmlParserService {
let item: any = {};
Utils.copyFromXML(xmlItem, item, itemFields);
if (xmlItem.enclosure) {
item.enclosure = xmlItem.enclosure[0].$;
if (Array.isArray(xmlItem.enclosure)) {
item.enclosure = xmlItem.enclosure[0].$;
}
else {
item.enclosure = xmlItem.enclosure.$;
}
}
if (xmlItem.description) {
if (Array.isArray(xmlItem.description)) {