Skip to content

Commit

Permalink
fix(gatsby): Check for nullable locations in query-runner (#21839)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricokahler committed Mar 2, 2020
1 parent 6b7ed63 commit dc484eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/gatsby/src/query/query-runner.js
Expand Up @@ -58,8 +58,8 @@ module.exports = async (graphqlRunner, queryJob: QueryJob) => {
...structuredError.context,
codeFrame: getCodeFrame(
queryJob.query,
e.locations[0].line,
e.locations[0].column
e.locations && e.locations[0].line,
e.locations && e.locations[0].column
),
filePath: queryJob.componentPath,
...(urlPath && { urlPath }),
Expand Down

0 comments on commit dc484eb

Please sign in to comment.