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
1 changed files with 6 additions and 0 deletions

View File

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