exilence-next
exilence-next copied to clipboard
Nullcheck activeProfile
@computed get getSelectedAccount(): Account { const account = this.accounts.find((a) => a.uuid === this.activeAccount); return account ? account : new Account(); }
@computed get activeProfile() { return this.profiles.find((p) => p.active); }
We use activeProfile in different places, and sometimes with the ! operator. We should instead nullcheck it properly.