Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SharpCoder
Copy link

@SharpCoder SharpCoder commented Feb 14, 2025

SharpCoder Quick SharpCoder /master → Lissy93/dashy Commits: 1 | Files Changed: 1 | Additions: 0 Label Powered by Pull Request Badge

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.

Category: Bugfix

Overview
The RssFeed widget would always try to read this.limit items from the array. For feeds with fewer items, it would throw an exception. My change will populate the lesser between: (the actual qty of items, or the limit).

Issue Number (if applicable)
N/A

New Vars (if applicable)
N/A

Screenshot (if applicable)
N/A

Code Quality Checklist (Please complete)

  • All changes are backwards compatible
  • All lint checks and tests are passing
  • There are no (new) build warnings or errors
  • (If a new config option is added) Attribute is outlined in the schema and documented
  • (If a new dependency is added) Package is essential, and has been checked out for security or performance
  • (If significant change) Bumps version in package.json

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.
Copy link

netlify bot commented Feb 14, 2025

Deploy Preview for dashy-dev ready!

Name Link
🔨 Latest commit b6ae17a
🔍 Latest deploy log https://app.netlify.com/sites/dashy-dev/deploys/67aeccc2b64aed0008f992a3
😎 Deploy Preview https://deploy-preview-1817--dashy-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant