mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-28 16:14:33 +02:00
🐛 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:
parent
40b6699d04
commit
b6ae17aad1
@ -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({
|
||||
|
Loading…
x
Reference in New Issue
Block a user