Skip to content

Commit f2de46f

Browse files
shepherdjerredrenovate[bot]
authored andcommitted
fix: linter
1 parent e4ad27b commit f2de46f

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/fetch.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,7 @@ export async function fetch(source: Source, length: number): Promise<ResultEntry
3535
url: firstItem.link,
3636
date: new Date(firstItem.date),
3737
source,
38-
preview: preview
39-
? ((truncate.default(sanitizeHtml(preview, { parseStyleAttributes: false }), length) as Exclude<
40-
ReturnType<typeof truncate.default>,
41-
object
42-
>) ?? undefined)
43-
: undefined,
38+
preview: preview ? truncate.default(sanitizeHtml(preview, { parseStyleAttributes: false }), length) : undefined,
4439
};
4540
} catch (e) {
4641
console.error(`Error fetching ${source.url}: ${e as string}`);

0 commit comments

Comments
 (0)