diff --git a/www/common/outer/profile.js b/www/common/outer/profile.js index 6d98e0d69..5b76a1ce3 100644 --- a/www/common/outer/profile.js +++ b/www/common/outer/profile.js @@ -111,7 +111,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); } }; Profile.init = function (cfg, waitFor, emit) {