summaryrefslogtreecommitdiff
path: root/packages/astro-rss/src
diff options
context:
space:
mode:
authorGravatar matthewp <matthewp@users.noreply.github.com> 2022-07-13 20:39:29 +0000
committerGravatar fredkbot <fred+astrobot@astro.build> 2022-07-13 20:39:29 +0000
commitfa8ec57f16a970e642e69eeeba425a1affd05189 (patch)
treef88dc5166daa882dc1bae4490341999746b3a812 /packages/astro-rss/src
parentcd2dbfedb15969274df40b1c41b6680ea8885e8d (diff)
downloadastro-fa8ec57f16a970e642e69eeeba425a1affd05189.tar.gz
astro-fa8ec57f16a970e642e69eeeba425a1affd05189.tar.zst
astro-fa8ec57f16a970e642e69eeeba425a1affd05189.zip
[ci] format
Diffstat (limited to 'packages/astro-rss/src')
-rw-r--r--packages/astro-rss/src/index.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/astro-rss/src/index.ts b/packages/astro-rss/src/index.ts
index 2ff803d8b..d715b7dc0 100644
--- a/packages/astro-rss/src/index.ts
+++ b/packages/astro-rss/src/index.ts
@@ -152,9 +152,11 @@ const requiredFields = Object.freeze(['link', 'title']);
// Perform validation to make sure all required fields are passed.
function validate(item: RSSFeedItem) {
- for(const field of requiredFields) {
- if(!(field in item)) {
- throw new Error(`@astrojs/rss: Required field [${field}] is missing. RSS cannot be generated without it.`);
+ for (const field of requiredFields) {
+ if (!(field in item)) {
+ throw new Error(
+ `@astrojs/rss: Required field [${field}] is missing. RSS cannot be generated without it.`
+ );
}
}
}