From f98089883d99a61114b139cdedf8e541357a3f98 Mon Sep 17 00:00:00 2001 From: CalebZYC Date: Sat, 4 Dec 2021 23:20:30 +0800 Subject: [PATCH] fix gray publish refresh item status(#4039) --- .../static/scripts/directive/release-modal-directive.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apollo-portal/src/main/resources/static/scripts/directive/release-modal-directive.js b/apollo-portal/src/main/resources/static/scripts/directive/release-modal-directive.js index 5d6af9ff800..163c9b39cf6 100644 --- a/apollo-portal/src/main/resources/static/scripts/directive/release-modal-directive.js +++ b/apollo-portal/src/main/resources/static/scripts/directive/release-modal-directive.js @@ -111,13 +111,16 @@ function releaseModalDirective($translate, toastr, AppUtil, EventManager, Releas scope.releaseBtnDisabled = false; //refresh item status - scope.toReleaseNamespace.branchItems.forEach(function (item, index) { + for (let index = 0; index < scope.toReleaseNamespace.branchItems.length; index++) { + const item = scope.toReleaseNamespace.branchItems[index]; if (item.isDeleted) { scope.toReleaseNamespace.branchItems.splice(index, 1); + index--; } else { item.isModified = false; } - }); + } + //reset namespace status scope.toReleaseNamespace.itemModifiedCnt = 0; scope.toReleaseNamespace.lockOwner = undefined;