diff --git a/CHANGES.md b/CHANGES.md index f774b6887bc..fd21bde390c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -25,6 +25,7 @@ Apollo 2.0.0 * [Support export/import configs by apollo env](https://github.com/apolloconfig/apollo/pull/3947) * [Catch LinkageError for ClassLoaderUtil.isClassPresent in case class is present but is failed to load](https://github.com/apolloconfig/apollo/pull/4097) * [Split helm chart into another repo](https://github.com/apolloconfig/apollo/pull/4125) +* [fix gray publish refresh item status](https://github.com/apolloconfig/apollo/pull/4128) ------------------ All issues and pull requests are [here](https://github.com/ctripcorp/apollo/milestone/8?closed=1) 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;