mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-11-29 11:24:11 +01:00
Call callback also on failure
This commit is contained in:
parent
c5f4713915
commit
a2af42fcab
@ -857,6 +857,10 @@ OC.Contacts = OC.Contacts || {};
|
||||
cb({id:self.id});
|
||||
}
|
||||
}
|
||||
}).fail(function(response) {
|
||||
if(typeof cb === 'function') {
|
||||
cb(response);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@ -2326,6 +2330,8 @@ OC.Contacts = OC.Contacts || {};
|
||||
self.insertContact(self.contacts[result.id].getListItemElement());
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.warn(response);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user