Skip to content

Commit b9c56ce

Browse files
committed
fix: error TS2345:
1 parent a52702b commit b9c56ce

File tree

1 file changed

+2
-2
lines changed
  • packages/vitepress-plugin-rss/src

1 file changed

+2
-2
lines changed

packages/vitepress-plugin-rss/src/node.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export async function genFeed(config: SiteConfig, rssOptions: RSSOptions) {
136136
const { baseUrl, filename } = rssOptions
137137

138138
// eslint-disable-next-line unused-imports/no-unused-vars
139-
const { renderHTML, transform = (v) => v, ...restOps } = rssOptions
139+
const { renderHTML, transform = v => v, ...restOps } = rssOptions
140140
const feed = new Feed({
141141
id: rssOptions.baseUrl,
142142
link: rssOptions.baseUrl,
@@ -158,7 +158,7 @@ export async function genFeed(config: SiteConfig, rssOptions: RSSOptions) {
158158
id: link,
159159
link,
160160
description,
161-
content: transform(htmlCache.get(post.filepath)?.replaceAll('​', '')),
161+
content: transform((htmlCache.get(post.filepath) ?? '').replaceAll('​', '')),
162162
author: [
163163
{
164164
name: author,

0 commit comments

Comments
 (0)