Skip to content

Commit dc484eb

Browse files
authoredMar 2, 2020
fix(gatsby): Check for nullable locations in query-runner (#21839)
1 parent 6b7ed63 commit dc484eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎packages/gatsby/src/query/query-runner.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ module.exports = async (graphqlRunner, queryJob: QueryJob) => {
5858
...structuredError.context,
5959
codeFrame: getCodeFrame(
6060
queryJob.query,
61-
e.locations[0].line,
62-
e.locations[0].column
61+
e.locations && e.locations[0].line,
62+
e.locations && e.locations[0].column
6363
),
6464
filePath: queryJob.componentPath,
6565
...(urlPath && { urlPath }),

0 commit comments

Comments
 (0)
Please sign in to comment.