do not try to extend fragments that don’t exist yet

This commit is contained in:
SachaG 2017-06-22 16:19:23 +09:00
parent de76f6404d
commit a3abb94d3a

View file

@ -86,9 +86,11 @@ export const initializeFragment = (fragmentName) => {
}
export const initializeFragments = () => {
// extend fragment text
// extend fragment text if fragment exists
_.forEach(FragmentsExtensions, (newProperties, fragmentName) => {
if (Fragments[fragmentName]) {
extendFragmentWithProperties(fragmentName, newProperties);
}
});
// initialize fragments to create gql fragment object
_.forEach(Fragments, (fragmentItem, fragmentName) => {