From abc9466abe71a76d1d31ef6a3c2c9bba4d2233e4 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 17 Jun 2021 09:24:58 +0530 Subject: [PATCH] guard against invalid team info --- www/common/cryptpad-common.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 6c1828897..9eb5398e7 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -92,7 +92,12 @@ define([ if (!obj || obj.error) { return; } Object.keys(obj || {}).forEach(function (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; if (!_keys.edPrivate) { return; } keys.push(t.keys.drive);