Skip to content

Commit 23554b7

Browse files
committed
fix: explicitly check firstError !== null in getGraphQLErrorMessage
1 parent 55488c1 commit 23554b7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/github.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ function getGraphQLErrorMessage(errors: unknown): string {
173173
if (!Array.isArray(errors)) return 'GitHub GraphQL API returned an unknown error';
174174
const firstError = errors[0];
175175
if (
176-
firstError &&
176+
firstError !== null &&
177177
typeof firstError === 'object' &&
178178
'message' in firstError &&
179179
typeof firstError.message === 'string'

0 commit comments

Comments
 (0)