From 0c88edc61b788c5a33de2ab85fda9680deb80bc2 Mon Sep 17 00:00:00 2001 From: Alexandre Cloutier Date: Thu, 4 Sep 2014 11:09:04 -0400 Subject: [PATCH] bugfix where an exception was raised if threadsCollapsed is undefined --- UI/WebServerResources/SOGoMailDataSource.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/UI/WebServerResources/SOGoMailDataSource.js b/UI/WebServerResources/SOGoMailDataSource.js index 6535f57ff..b6758e559 100644 --- a/UI/WebServerResources/SOGoMailDataSource.js +++ b/UI/WebServerResources/SOGoMailDataSource.js @@ -198,8 +198,11 @@ SOGoMailDataSource = Class.create({ // Add thread-related data if (parseInt(this.uids[i][2]) > 0) { var mailbox = Mailer.currentMailbox; - if ((UserSettings.Mail.threadsCollapsed[Mailer.currentMailbox] != undefined) && (UserSettings.Mail.threadsCollapsed[Mailer.currentMailbox].indexOf((this.uids[i][0]).toString())) != -1) - data[j]['Thread'] = ''; + if ((UserSettings.Mail.threadsCollapsed != undefined) && + (UserSettings.Mail.threadsCollapsed[Mailer.currentMailbox] != undefined) && + (UserSettings.Mail.threadsCollapsed[Mailer.currentMailbox].indexOf((this.uids[i][0]).toString())) != -1) { + data[j]['Thread'] = ''; + } else data[j]['Thread'] = ''; }