Bugfix for accounts that have no servers...

This commit is contained in:
Sarah Jamie Lewis 2021-05-31 15:38:07 -07:00
parent 0ffadc5ce9
commit 32737ae311
2 changed files with 2 additions and 2 deletions

View File

@ -3,4 +3,4 @@ const dev_version = "development";
class EnvironmentConfig {
static const BUILD_VER = String.fromEnvironment('BUILD_VER', defaultValue: dev_version);
static const BUILD_DATE = String.fromEnvironment('BUILD_DATE', defaultValue: "now");
}
}

View File

@ -34,7 +34,7 @@ class _AddContactViewState extends State<AddContactView> {
@override
Widget build(BuildContext context) {
// if we haven't picked a server yet, pick the first one in the list...
if (server.isEmpty) {
if (server.isEmpty && Provider.of<ProfileInfoState>(context).serverList.servers.isNotEmpty) {
server = Provider.of<ProfileInfoState>(context).serverList.servers.first.onion;
}