diff --git a/app/portainer/components/forms/stack-redeploy-git-form/stack-redeploy-git-form.controller.js b/app/portainer/components/forms/stack-redeploy-git-form/stack-redeploy-git-form.controller.js index 7aa527f03..1a3092b7c 100644 --- a/app/portainer/components/forms/stack-redeploy-git-form/stack-redeploy-git-form.controller.js +++ b/app/portainer/components/forms/stack-redeploy-git-form/stack-redeploy-git-form.controller.js @@ -95,13 +95,13 @@ class StackRedeployGitFormController { ''; const template = angular.element(tplCrop); const html = this.$compile(template)(this.$scope); - this.ModalService.confirmStackUpdate(html, true, true, 'btn-warning', function (result) { + this.ModalService.confirmStackUpdate(html, true, true, 'btn-warning', async (result) => { if (!result) { return; } try { this.state.redeployInProgress = true; - this.StackService.updateGit(this.stack.Id, this.stack.EndpointId, this.FormHelper.removeInvalidEnvVars(this.formValues.Env), false, this.formValues); + await this.StackService.updateGit(this.stack.Id, this.stack.EndpointId, this.FormHelper.removeInvalidEnvVars(this.formValues.Env), false, this.formValues); this.Notifications.success('Pulled and redeployed stack successfully'); this.$state.reload(); } catch (err) {