Skip to content

Commit

Permalink
flow fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vsubhuman committed Sep 27, 2024
1 parent 1856469 commit 4ff7c6c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/yoroi-extension/app/stores/toplevel/WalletStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export default class WalletStore extends Store<StoresMap, ActionsMap> {
}

@computed get selected(): null | WalletState {
if (typeof this.selectedIndex === 'number') {
if (this.selectedIndex != null) {
return this.wallets[this.selectedIndex];
}
return null;
Expand Down Expand Up @@ -415,7 +415,9 @@ export default class WalletStore extends Store<StoresMap, ActionsMap> {

@action onRenameSelectedWallet: (string) => void = (newName) => {
this.selectedWalletName = newName;
this.wallets[this.selectedIndex].name = newName;
if (this.selectedIndex != null) {
this.wallets[this.selectedIndex].name = newName;
}
}
}

Expand Down

0 comments on commit 4ff7c6c

Please sign in to comment.