From a8c3e7f4a7d098e18bbfa7459074fd72e7452e82 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 19 Aug 2024 12:53:48 +0200 Subject: [PATCH] Fix array splice error in profile module --- www/common/outer/profile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {