From 87e57af0908a3baec7cc48704340e644e357f2ff Mon Sep 17 00:00:00 2001 From: Beaudan Brown Date: Thu, 29 Aug 2019 13:19:27 +1000 Subject: [PATCH 1/2] Fix feed reader for single element results --- js/modules/loki_rss_api.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/modules/loki_rss_api.js b/js/modules/loki_rss_api.js index a6f446dbe..bf4dedebb 100644 --- a/js/modules/loki_rss_api.js +++ b/js/modules/loki_rss_api.js @@ -86,6 +86,10 @@ class LokiRssAPI extends EventEmitter { // no records return; } + if (feedObj.rss.channel.item.constructor !== Array) { + // Treat single record as array for consistency + feedObj.rss.channel.item = [feedObj.rss.channel.item]; + } feedObj.rss.channel.item.reverse().forEach(item => { // log.debug('item', item) From ba72f55b03cbdfef962b4c6436fcb687afff0bce Mon Sep 17 00:00:00 2001 From: Beaudan Brown Date: Fri, 30 Aug 2019 11:56:59 +1000 Subject: [PATCH 2/2] Fix missing react key error --- ts/components/conversation/Linkify.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ts/components/conversation/Linkify.tsx b/ts/components/conversation/Linkify.tsx index 0f27953d7..6562b6ed8 100644 --- a/ts/components/conversation/Linkify.tsx +++ b/ts/components/conversation/Linkify.tsx @@ -25,10 +25,12 @@ export class Linkify extends React.Component { public render() { const { text, renderNonLink, isRss } = this.props; const results: Array = []; + let count = 1; if (isRss && text.indexOf(' { const matchData = linkify.match(text) || []; let last = 0; - let count = 1; // We have to do this, because renderNonLink is not required in our Props object, // but it is always provided via defaultProps.