Sometimes the list of remotes can be null (#96)

This commit is contained in:
Nate Brown 2022-11-21 13:31:58 -06:00 committed by GitHub
parent a5ec4f5ed5
commit bb457c7c83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -113,7 +113,7 @@ class SiteList {
print("Error while migrating site to fs: \(error!.localizedDescription)")
}
print("Migraded site to fs: \(site.name)")
print("Migrated site to fs: \(site.name)")
site.needsToMigrateToFS = false
dispatchGroup.leave()
}

View File

@ -32,9 +32,9 @@ class HostInfo {
cert = Certificate.fromJson(json['cert']);
}
List<dynamic> addrs = json['remoteAddrs'];
List<dynamic>? addrs = json['remoteAddrs'];
List<UDPAddress> remoteAddresses = [];
addrs.forEach((val) {
addrs?.forEach((val) {
remoteAddresses.add(UDPAddress.fromJson(val));
});