Skip to content

Commit e232ad4

Browse files
fix(search): type Notion block values as any for build
Object.values on the (any-typed) recordMap block fell back to {} and lost the element type under next build, causing a type error. Annotate Object.values<any>. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent e80d79f commit e232ad4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎apps/web/lib/search.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export async function scrapeData({ trackId }: { trackId: string }) {
2222
track?.problems.map(async (problem: any) => {
2323
const notionDocId = problem.notionDocId;
2424
const notionPage = await fetchNotionPage(notion, notionDocId);
25-
const titles = Object.values(notionPage?.block ?? {})
25+
const titles = Object.values<any>(notionPage?.block ?? {})
2626
.map((block) => {
2727
const title = block?.value?.properties?.title;
2828
if (title && title[0] && title[0][0]) {

0 commit comments

Comments
 (0)