🔀 Merge pull request #1817 from SharpCoder/master

🐛 Fix a bug in RssFeed widget that crashes on small feeds.
This commit is contained in:
Alicia Sykes 2025-07-19 07:33:33 +01:00 committed by GitHub
commit 2576b541b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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