1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-10 11:15:01 -05:00

handle error in case key ids are emtpy

This commit is contained in:
Tankred Hase 2013-10-04 17:43:55 +02:00
parent e050c9854b
commit c2cf878632

View File

@ -21,6 +21,12 @@ define(['underscore', 'js/dao/lawnchair-dao'], function(_, jsonDao) {
var self = this, var self = this,
after, already, pubkeys = []; after, already, pubkeys = [];
// return empty array if key ids are emtpy
if (ids.length < 1) {
callback(null, pubkeys);
return;
}
after = _.after(ids.length, function() { after = _.after(ids.length, function() {
callback(null, pubkeys); callback(null, pubkeys);
}); });