Skip to content

Commit

Permalink
Fix bug where there's a blank row displayed when the TXT record is em…
Browse files Browse the repository at this point in the history
…pty.
  • Loading branch information
lapcat committed Sep 13, 2019
1 parent 2523da5 commit 07d95e7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/ServiceDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 07d95e7

Please sign in to comment.