Skip to content

Commit 3b81a99

Browse files
Code-Hexclaude
andcommitted
fix(scalar): guard against null tsType before 'in' operator check
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 39e5bc4 commit 3b81a99

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/scalar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function buildScalarSchema(
2828
}
2929

3030
const tsType = visitor.getScalarType(scalarName);
31-
if (tsType in options.typeMap)
31+
if (tsType != null && tsType in options.typeMap)
3232
return options.typeMap[tsType as keyof typeof options.typeMap];
3333

3434
if (config.defaultScalarTypeSchema)

0 commit comments

Comments
 (0)