Skip to content

Commit

Permalink
Correctly merge env edits after background upates
Browse files Browse the repository at this point in the history
  • Loading branch information
spadgett committed Oct 31, 2017
1 parent 9b48a7b commit 4fa90c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/scripts/directives/editEnvironmentVariables.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
// variables. If not, merge the environment edits into the updated
// deployment config object.
if (EnvironmentService.isEnvironmentEqual(currentValue, previousValue)) {
ctrl.updatedObject = EnvironmentService.mergeEdits(currentValue, previousValue);
ctrl.updatedObject = EnvironmentService.mergeEdits(ctrl.updatedObject, currentValue);
return;
}

Expand Down
2 changes: 1 addition & 1 deletion dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -14467,7 +14467,7 @@ bottom: n.offsetBottom
angular.module("openshiftConsole").component("editEnvironmentVariables", {
controller: [ "$filter", "APIService", "DataService", "EnvironmentService", "NotificationsService", function(e, t, n, a, r) {
var o, i, s, c, l = this, u = !1, d = [], m = [], p = !1, f = e("canI"), g = e("getErrorDetails"), v = e("humanizeKind"), h = e("orderByDisplayName"), y = function(e, t) {
u || (l.form && !l.form.$pristine && l.updatedObject ? a.isEnvironmentEqual(e, t) ? l.updatedObject = a.mergeEdits(e, t) : (u = !0, r.addNotification({
u || (l.form && !l.form.$pristine && l.updatedObject ? a.isEnvironmentEqual(e, t) ? l.updatedObject = a.mergeEdits(l.updatedObject, e) : (u = !0, r.addNotification({
type: "warning",
message: "The environment variables for the " + o + " have been updated in the background.",
details: "Saving your changes may create a conflict or cause loss of data."
Expand Down

0 comments on commit 4fa90c7

Please sign in to comment.