From 2841d9bd21bee3fd2ea2c0464ee32bf3183181f8 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Wed, 16 Sep 2020 13:02:35 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20resolve=20warnings=20abou?= =?UTF-8?q?t=20updating=20a=20tracked=20property?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/core/app/components/form/account/password/index.js | 3 ++- .../app/components/form/account/password/set-password/index.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/core/app/components/form/account/password/index.js b/ui/core/app/components/form/account/password/index.js index e80e48c95..6b500094d 100644 --- a/ui/core/app/components/form/account/password/index.js +++ b/ui/core/app/components/form/account/password/index.js @@ -1,6 +1,7 @@ import Component from '@glimmer/component'; import { tracked } from '@glimmer/tracking'; import { action } from '@ember/object'; +import { next } from '@ember/runloop'; export default class FormAccountPasswordIndexComponent extends Component { @@ -31,7 +32,7 @@ export default class FormAccountPasswordIndexComponent extends Component { @action submit(fn) { const password = this.password; - this.resetPassword(); + next(() => this.resetPassword()); this.args.model.isNew ? fn(password) : fn(); } } diff --git a/ui/core/app/components/form/account/password/set-password/index.js b/ui/core/app/components/form/account/password/set-password/index.js index 477c14cee..e034e0995 100644 --- a/ui/core/app/components/form/account/password/set-password/index.js +++ b/ui/core/app/components/form/account/password/set-password/index.js @@ -2,6 +2,7 @@ import Component from '@glimmer/component'; import { tracked } from '@glimmer/tracking'; import { computed } from '@ember/object'; import { action } from '@ember/object'; +import { next } from '@ember/runloop'; export default class FormAccountPasswordSetPasswordIndexComponent extends Component { @@ -40,7 +41,7 @@ export default class FormAccountPasswordSetPasswordIndexComponent extends Compon @action submit(fn) { const password = this.password; - this.resetPassword(); + next(() => this.resetPassword()); fn(password); }