From bb457c7c8396227f1f3e477530d21d987ed99344 Mon Sep 17 00:00:00 2001 From: Nate Brown Date: Mon, 21 Nov 2022 13:31:58 -0600 Subject: [PATCH] Sometimes the list of remotes can be null (#96) --- ios/NebulaNetworkExtension/SiteList.swift | 2 +- lib/models/HostInfo.dart | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/NebulaNetworkExtension/SiteList.swift b/ios/NebulaNetworkExtension/SiteList.swift index 2a0a478..b6f2bb9 100644 --- a/ios/NebulaNetworkExtension/SiteList.swift +++ b/ios/NebulaNetworkExtension/SiteList.swift @@ -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() } diff --git a/lib/models/HostInfo.dart b/lib/models/HostInfo.dart index d90851a..4cdaab6 100644 --- a/lib/models/HostInfo.dart +++ b/lib/models/HostInfo.dart @@ -32,9 +32,9 @@ class HostInfo { cert = Certificate.fromJson(json['cert']); } - List addrs = json['remoteAddrs']; + List? addrs = json['remoteAddrs']; List remoteAddresses = []; - addrs.forEach((val) { + addrs?.forEach((val) { remoteAddresses.add(UDPAddress.fromJson(val)); });