diff --git a/packages/neon/neon/lib/src/utils/global_options.dart b/packages/neon/neon/lib/src/utils/global_options.dart index dfaf4a5c..f4821c06 100644 --- a/packages/neon/neon/lib/src/utils/global_options.dart +++ b/packages/neon/neon/lib/src/utils/global_options.dart @@ -92,14 +92,13 @@ class GlobalOptions extends OptionsCollection { } void updateAccounts(final List accounts) { - if (accounts.isEmpty) { - return; - } initialAccount.values = { - for (final account in accounts) ...{ - account.id: (final context) => account.humanReadableID, - }, + for (final account in accounts) account.id: (final context) => account.humanReadableID, }; + + if (accounts.tryFind(initialAccount.value) == null) { + initialAccount.reset(); + } } Future updateDistributors(final List distributors) async {