From 1c08a6ecf0cdd34e168191d9e6d95386f5654b7c Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Wed, 27 Sep 2023 23:35:36 +0300 Subject: [PATCH] Refactor calls to `delete expandedTestCaseIds` because SonarLint isn't happy: https://rules.sonarsource.com/typescript/RSPEC-2870/ --- tcms/testplans/static/testplans/js/get.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcms/testplans/static/testplans/js/get.js b/tcms/testplans/static/testplans/js/get.js index 79f66b4962..d62ffa3486 100644 --- a/tcms/testplans/static/testplans/js/get.js +++ b/tcms/testplans/static/testplans/js/get.js @@ -151,7 +151,7 @@ function redrawSingleRow (testCaseId, testPlanId, permissions) { const newRow = getTestCaseRowContent(testCaseRowDocumentFragment.cloneNode(true), allTestCases[testCaseId], permissions) // remove from expanded list b/c the comment section may have changed - delete expandedTestCaseIds[expandedTestCaseIds.indexOf(testCaseId)] + expandedTestCaseIds.splice(expandedTestCaseIds.indexOf(testCaseId), 1) // replace the element in the dom $(`[data-testcase-pk=${testCaseId}]`).replaceWith(newRow)