diff --git a/www/common/outer/calendar.js b/www/common/outer/calendar.js index 1b3f02231..21bff21ff 100644 --- a/www/common/outer/calendar.js +++ b/www/common/outer/calendar.js @@ -1055,7 +1055,7 @@ define([ var removeClient = function (ctx, cId) { var idx = ctx.clients.indexOf(cId); - ctx.clients.splice(idx, 1); + if (idx !== -1) { ctx.clients.splice(idx, 1); } Object.keys(ctx.calendars).forEach(function (id) { var cal = ctx.calendars[id];