Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
nab138 authored May 6, 2024
1 parent c318319 commit 9004c92
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/NetworkTables/NT4Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ class NT4Client: WebSocketDelegate {
onDisconnect?(reason, code)
case .text(let string):
if let data = string.data(using: .utf8) {
if let msg = try? JSONSerialization.jsonObject(with: args.Data, options: []) as? [[String: Any]] {
if let msg = try? JSONSerialization.jsonObject(with: data, options: []) as? [[String: Any]] {
if msg == nil {
print("[NT4] Failed to decode JSON message: \(message)")
print("[NT4] Failed to decode JSON message: \(string)")
return
}
// Iterate through the messages
Expand Down Expand Up @@ -162,4 +162,4 @@ class NT4Client: WebSocketDelegate {
return NT4Client.getClientTimeUS() + serverTimeOffset_us!
}

}
}

0 comments on commit 9004c92

Please sign in to comment.