guard against invalid team info

pull/1/head
ansuz 4 years ago
parent 92c814e49d
commit abc9466abe

@ -92,7 +92,12 @@ define([
if (!obj || obj.error) { return; } if (!obj || obj.error) { return; }
Object.keys(obj || {}).forEach(function (id) { Object.keys(obj || {}).forEach(function (id) {
var t = obj[id]; var t = obj[id];
var _keys = t.keys.drive || {}; var _keys = {};
try {
_keys = t.keys.drive || {};
} catch (err) {
console.error(err);
}
_keys.id = id; _keys.id = id;
if (!_keys.edPrivate) { return; } if (!_keys.edPrivate) { return; }
keys.push(t.keys.drive); keys.push(t.keys.drive);

Loading…
Cancel
Save