fix: 🐛 resolve warnings about updating a tracked property

This commit is contained in:
Randall Morey committed 2020-09-16 13:02:35 -04:00
1 parent 200649434c
commit 2841d9bd21
2 files changed
+4 -2

No files matched your search

@@ -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();
}
}
@@ -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);
}