From 07d95e7e64fc6f24c5ed86175983bbec3e7bda0f Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Thu, 12 Sep 2019 19:52:39 -0500 Subject: [PATCH] Fix bug where there's a blank row displayed when the TXT record is empty. --- source/ServiceDelegate.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/ServiceDelegate.swift b/source/ServiceDelegate.swift index 915db71..4f83f8a 100644 --- a/source/ServiceDelegate.swift +++ b/source/ServiceDelegate.swift @@ -116,6 +116,9 @@ class ServiceDelegate:NSObject, NetServiceDelegate, BonjourNode { records.removeAll() if let txtRecordData = service.txtRecordData() { + if txtRecordData.isEmpty { + return + } // This crashes in Swift: //let txtRecord = NetService.dictionary(fromTXTRecord:txtRecordData) // When the TXT Record is not in the format key=value,