From: Ram Krishna Verma Date: Wed, 8 Sep 2021 19:18:00 +0000 (-0400) Subject: Fix sonar issue in policy/gui X-Git-Tag: 2.1.0~8^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F70%2F123970%2F1;p=policy%2Fgui.git Fix sonar issue in policy/gui Issue-ID: POLICY-3077 Change-Id: Ia4a1a12ab286d40205ec5a81d130c4845cd93cea Signed-off-by: Ram Krishna Verma --- diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyEditForm.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyEditForm.js index edaf7b7..df0ddf0 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyEditForm.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyEditForm.js @@ -440,8 +440,7 @@ function editPolicyForm_activate(parent, operation, policy, tasks, events, conte break; } } - for (i = 0; i < policy.state.entry.length; i++) { - var stateEntry = policy.state.entry[i]; + for (let stateEntry of policy.state.entry) { statename = stateEntry.key; state = stateEntry.value; var stateLI = editPolicyForm_addState(statename, state, createEditOrView, policy, tasks, events,