We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 033cda6 commit 8bd09d1Copy full SHA for 8bd09d1
src/utils/getFlowType.js
@@ -293,6 +293,12 @@ function getFlowTypeWithResolvedTypes(path: NodePath): FlowTypeDescriptor {
293
* If there is no match, "unknown" is returned.
294
*/
295
export default function getFlowType(path: NodePath): FlowTypeDescriptor {
296
+ // Empty visited types before an after run
297
+ // Before: in case the detection threw and we rerun again
298
+ // After: cleanup memory after we are done here
299
visitedTypes = {};
- return getFlowTypeWithResolvedTypes(path);
300
+ const type = getFlowTypeWithResolvedTypes(path);
301
+ visitedTypes = {};
302
+
303
+ return type;
304
}
0 commit comments