Skip to content

Commit 7d7ebef

Browse files
committed
Bug: tsc bug 수정
- npm i 중 yarn compile 할 때 버그 발생
1 parent 9737ed3 commit 7d7ebef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export const getPreviewData = async (text: string, requestTimeout = 5000) => {
122122
let matches: RegExpMatchArray | null
123123
const meta: RegExpMatchArray[] = []
124124
while ((matches = REGEX_META.exec(head)) !== null) {
125-
meta.push([...matches])
125+
meta.push([...matches] as RegExpMatchArray)
126126
}
127127

128128
const metaPreviewData = meta.reduce<{
@@ -164,7 +164,7 @@ export const getPreviewData = async (text: string, requestTimeout = 5000) => {
164164
let imageMatches: RegExpMatchArray | null
165165
const tags: RegExpMatchArray[] = []
166166
while ((imageMatches = REGEX_IMAGE_TAG.exec(html)) !== null) {
167-
tags.push([...imageMatches])
167+
tags.push([...imageMatches] as RegExpMatchArray)
168168
}
169169

170170
let images: PreviewDataImage[] = []

0 commit comments

Comments
 (0)