We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
has_notes
1 parent 771546d commit a6b6c85Copy full SHA for a6b6c85
workspaces/leetcode-api/src/api/submission-list-non-graphql/main.ts
@@ -67,8 +67,9 @@ const submissionZodType = (() => {
67
.nullable(),
68
// eslint-disable-next-line camelcase
69
title_slug: slugZodType,
70
+ // The `has_notes` field can sometimes come back null, see for example submission 1201108107 which has an auto-generated note.
71
- has_notes: z.boolean(),
72
+ has_notes: z.boolean().nullable().transform(val => val ?? true),
73
74
flag_type: int,
75
})
0 commit comments