Skip to content

Commit

Permalink
Fix null condition
Browse files Browse the repository at this point in the history
  • Loading branch information
pshenmic committed Feb 20, 2024
1 parent 868c4d4 commit 1f3accc
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/routes/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,13 @@ class _SettingsPageState extends State<SettingsPage> {

void _rebuild() {
setState(() {
denomination = Authentication.currentAccount.denomination ?? 'USD';
symbol = Currencies.all[denomination]!['symbol'];
if (Authentication.currentAccount.denomination != null) {
denomination = Authentication.currentAccount.denomination;
symbol = Currencies.all[denomination]!['symbol'];
} else {
denomination = 'USD';
symbol = '\$';
}
});
}

Expand Down

0 comments on commit 1f3accc

Please sign in to comment.