Skip to content

Commit

Permalink
locatedError: correct definition to pass Flow 0.68 check (#1292)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov authored and leebyron committed Apr 5, 2018
1 parent 43ff3e3 commit fb2f239
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/error/locatedError.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ import type { ASTNode } from '../language/ast';
* document responsible for the original Error.
*/
export function locatedError(
originalError: Error,
originalError: Error | GraphQLError,
nodes: $ReadOnlyArray<ASTNode>,
path: $ReadOnlyArray<string | number>,
): GraphQLError {
// Note: this uses a brand-check to support GraphQL errors originating from
// other contexts.
// $FlowFixMe(>=0.68.0)
if (originalError && Array.isArray(originalError.path)) {
return (originalError: any);
}
Expand Down

0 comments on commit fb2f239

Please sign in to comment.