Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Fix error in extractTypeMapFromTypeDefs #154

Merged
merged 1 commit into from
Dec 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ export const extractTypeMapFromTypeDefs = typeDefs => {
// into a single string for parse, add validatation
const astNodes = parse(typeDefs).definitions;
return astNodes.reduce((acc, t) => {
acc[t.name.value] = t;
if (t.name) acc[t.name.value] = t;
return acc;
}, {});
};
Expand Down