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 2cfd03bCopy full SHA for 2cfd03b
workspaces/leetcode-api/src/api/submission-list-non-graphql/main.ts
@@ -68,7 +68,11 @@ const submissionZodType = (() => {
68
// eslint-disable-next-line camelcase
69
title_slug: slugZodType,
70
71
- has_notes: z.boolean(),
+ has_notes: z
72
+ .boolean()
73
+ // The `has_notes` field can sometimes come back null, see for example submission 1201108107 which has an auto-generated note.
74
+ .nullable()
75
+ .transform((val) => val ?? true),
76
77
flag_type: int,
78
})
0 commit comments