Skip to content

Commit

Permalink
only rerender account view if account actually changed
Browse files Browse the repository at this point in the history
  • Loading branch information
powerpaul17 committed Apr 20, 2023
1 parent bfcecd6 commit 864cba1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/views/AccountView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { useAccountStore } from '../stores/accountStore';
import { useAccountStore, type Account } from '../stores/accountStore';
import AccountDetails from '../components/AccountDetails.vue';
Expand All @@ -33,8 +33,8 @@
}
},
watch: {
selectedAccount() {
this.forceRerender();
selectedAccount(newAccount: Account, oldAccount?: Account) {
if(newAccount.id !== oldAccount?.id) this.forceRerender();
}
},
methods: {
Expand Down

0 comments on commit 864cba1

Please sign in to comment.