🐛 Fix a bug in RssFeed widget that crashes on small feeds.

RssFeed would always default to this.limit for the size of the feed item array.
Feeds that came in with fewer items than the limit would throw an exception, because
the loop would then try to iterate over non-existent entries.
This commit is contained in:
Josh Cole 2025-02-13 20:47:30 -08:00
parent 40b6699d04
commit b6ae17aad1

View File

@ -131,7 +131,7 @@ export default {
const posts = [];
let { length } = items;
if (this.limit) {
length = this.limit;
length = Math.min(length, this.limit);
}
for (let i = 0; length > i; i += 1) {
posts.push({