Skip to content

Commit 63c631c

Browse files
committed
style(route/farsnews): fix oxlint issues
1 parent 61aa8d3 commit 63c631c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/routes/farsnews/showcase.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { load } from 'cheerio';
21
import type { Route } from '@/types';
32
import cache from '@/utils/cache';
43
import got from '@/utils/got';
54
import { parseDate } from '@/utils/parse-date';
5+
import { load } from 'cheerio';
66

77
export const route: Route = {
88
path: '/showcase/:category?',
@@ -35,7 +35,7 @@ function extractHydrationData(html: string): any {
3535
.find((html) => html?.includes('window.__hydrationDataString'));
3636

3737
if (hydrationScript) {
38-
const match = hydrationScript.match(/window\.__hydrationDataString\s*=\s*'([^']+)'/);
38+
const match = /window\.__hydrationDataString\s*=\s*'([^']+)'/.exec(hydrationScript);
3939
if (match) {
4040
try {
4141
return JSON.parse(match[1]);

0 commit comments

Comments
 (0)