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

Throw the error when site option is missing #3956

Merged
merged 7 commits into from
Jul 18, 2022

Conversation

esafev
Copy link
Contributor

@esafev esafev commented Jul 18, 2022

Changes

Recently, I faced a problem when the RSS plugin threw an error that said Cannot read properties of undefined (reading 'replace') #3846, and this flaw was fixed in this PR #3498

In my case, bumping the version helped, but I spent some time understanding what was wrong and found the above issues. Therefore, I added a throwing error which returns a more expected stacktrace for cases when site option was not included.

Testing

Added a test for checking that exception return corrected.

Docs

No docs changed, small DX improve.

@changeset-bot
Copy link

changeset-bot bot commented Jul 18, 2022

🦋 Changeset detected

Latest commit: f90a431

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/rss Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@FredKSchott
Copy link
Member

Thanks @esafev, this looks great and should really help non-TS users.

@FredKSchott FredKSchott merged commit 57e529e into withastro:main Jul 18, 2022
@astrobot-houston astrobot-houston mentioned this pull request Jul 18, 2022
@esafev esafev deleted the rss-guard branch July 19, 2022 07:49
@esafev
Copy link
Contributor Author

esafev commented Jul 19, 2022

Thanks @esafev, this looks great and should really help non-TS users.

Yep, I use .mjs config from a starter template. That's why this change could be helpful for folks like me.

Thx!

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.

2 participants