Remove dependency on wrapResponse

This commit is contained in:
Chi Vinh Le
2017-09-07 16:04:01 +07:00
parent a78be6874b
commit d8a956d09c
2 changed files with 9 additions and 14 deletions
+1 -1
View File
@@ -109,7 +109,7 @@ export function mergeDocuments(documents) {
export function getResponseErrors(mutationResult) {
const result = [];
Object.keys(mutationResult.data).forEach((response) => {
const errors = mutationResult.data[response].errors;
const errors = mutationResult.data[response] && mutationResult.data[response].errors;
if (errors && errors.length) {
result.push(...errors);
}