Skip to content

Commit 4c16c2b

Browse files
committed
add @flow for language/index.js
1 parent 7369879 commit 4c16c2b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/error/GraphQLError.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,9 @@ export function GraphQLError( // eslint-disable-line no-redeclare
108108
}
109109

110110
let _locations;
111-
if (_source && _positions) {
112-
_locations = _positions.map(pos => getLocation(_source, pos));
111+
const _source2 = _source; // seems here Flow need a const to resolve type.
112+
if (_source2 && _positions) {
113+
_locations = _positions.map(pos => getLocation(_source2, pos));
113114
}
114115

115116
Object.defineProperties(this, {

src/language/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/** @flow
22
* Copyright (c) 2015, Facebook, Inc.
33
* All rights reserved.
44
*

0 commit comments

Comments
 (0)