mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-05 16:35:10 +00:00
fix(addressbook): Fix exception when using multiple address book source and searching. Fixes #5906.
This commit is contained in:
@@ -564,7 +564,7 @@
|
||||
// Respect the order of the results
|
||||
_.forEach(results, function(cardId, index) {
|
||||
var oldIndex, removedCards;
|
||||
if (cards[index].id != cardId) {
|
||||
if (!_.isUndefined(cards[index]) && cards[index].id != cardId) {
|
||||
oldIndex = _.findIndex(cards, _.bind(compareIds, cardId));
|
||||
removedCards = cards.splice(oldIndex, 1);
|
||||
cards.splice(index, 0, removedCards[0]);
|
||||
|
||||
Reference in New Issue
Block a user