Skip to content

Commit fb2f239

Browse files
IvanGoncharovleebyron
authored andcommitted
locatedError: correct definition to pass Flow 0.68 check (#1292)
1 parent 43ff3e3 commit fb2f239

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/error/locatedError.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@ import type { ASTNode } from '../language/ast';
1616
* document responsible for the original Error.
1717
*/
1818
export function locatedError(
19-
originalError: Error,
19+
originalError: Error | GraphQLError,
2020
nodes: $ReadOnlyArray<ASTNode>,
2121
path: $ReadOnlyArray<string | number>,
2222
): GraphQLError {
2323
// Note: this uses a brand-check to support GraphQL errors originating from
2424
// other contexts.
25-
// $FlowFixMe(>=0.68.0)
2625
if (originalError && Array.isArray(originalError.path)) {
2726
return (originalError: any);
2827
}

0 commit comments

Comments
 (0)