Skip to content

Commit 75a3901

Browse files
committed
ts is really bad at array indices
1 parent f34a91a commit 75a3901

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • apps/website/app/api/content/[space_id]/[resource_id]

apps/website/app/api/content/[space_id]/[resource_id]/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ export const GET = async (
172172
}
173173
const divideFM = fullContents.text.split("---\n");
174174
const firstTextFragment =
175-
divideFM.length > 2 && divideFM[0].trim().length == 0
176-
? divideFM[2]
175+
divideFM.length > 2 && divideFM[0]!.trim().length == 0
176+
? divideFM[2]!
177177
: fullContents.text;
178178

179179
const wrap = `<html><head>

0 commit comments

Comments
 (0)