From ded0ef4264f450a0b5efbc1e5e45ed25314d41df Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 20 May 2020 11:02:04 -0600 Subject: [PATCH] * Addressbook: Fix videoconference online check caused an error with non-user contacts --- addressbook/js/app.js | 3 +-- addressbook/js/app.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/addressbook/js/app.js b/addressbook/js/app.js index b7f1c54f1b..6972b724a4 100644 --- a/addressbook/js/app.js +++ b/addressbook/js/app.js @@ -1085,7 +1085,6 @@ var AddressbookApp = /** @class */ (function (_super) { * @param _selected */ AddressbookApp.prototype.videoconference_isUserOnline = function (_action, _selected) { - var _a; var list = app.status ? app.status.getEntireList() : {}; for (var sel in _selected) { if (sel == '0' && _selected[sel]['id'] == 'nm') @@ -1093,7 +1092,7 @@ var AddressbookApp = /** @class */ (function (_super) { var row = egw.dataGetUIDdata(_selected[sel]['id']); var enabled = false; for (var entry in list) { - if (((_a = row.data) === null || _a === void 0 ? void 0 : _a.account_id) == list[entry]['account_id']) { + if (row.data && row.data.account_id && row.data.account_id == list[entry]['account_id']) { enabled = list[entry]['data']['status']['active']; } } diff --git a/addressbook/js/app.ts b/addressbook/js/app.ts index 0a8a892fa8..6e32777472 100644 --- a/addressbook/js/app.ts +++ b/addressbook/js/app.ts @@ -1331,7 +1331,7 @@ class AddressbookApp extends EgwApp let enabled = false; for(let entry in list) { - if (row.data?.account_id == list[entry]['account_id']) + if (row.data && row.data.account_id && row.data.account_id == list[entry]['account_id']) { enabled = list[entry]['data']['status']['active']; }