summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2013-05-31 16:07:16 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2013-05-31 16:09:38 (GMT)
commitfb639f335cc072675b63d0e1e0e9de17ba306760 (patch)
treed45a4f51e9c11d5d9946ccab9882482c0b9a0a7f
parent574e17ad32b635484a1c570b2a0881598ec509f7 (diff)
downloadroundcubemail-plugins-kolab-fb639f335cc072675b63d0e1e0e9de17ba306760.tar.gz
Only temporarily split alarms string into array (#1905)
-rw-r--r--plugins/tasklist/tasklist.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/plugins/tasklist/tasklist.js b/plugins/tasklist/tasklist.js
index c3fe9db..b50471d 100644
--- a/plugins/tasklist/tasklist.js
+++ b/plugins/tasklist/tasklist.js
@@ -982,10 +982,7 @@ function rcube_tasklist_ui(settings)
// set alarm(s)
if (rec.alarms || action != 'new') {
- if (typeof rec.alarms == 'string')
- rec.alarms = rec.alarms.split(';');
-
- var valarms = rec.alarms || [''];
+ var valarms = (typeof rec.alarms == 'string' ? rec.alarms.split(';') : rec.alarms) || [''];
for (var alarm, i=0; i < valarms.length; i++) {
alarm = String(valarms[i]).split(':');
if (!alarm[1] && alarm[0]) alarm[1] = 'DISPLAY';