Skip to content

Commit

Permalink
Fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
humdrum committed Aug 1, 2024
1 parent d6dc6b1 commit 3119af7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Sources/Document/CRDT/CRDTTree.swift
Original file line number Diff line number Diff line change
Expand Up @@ -487,10 +487,8 @@ final class CRDTTreeNode: IndexTreeNode {
}

var toJSONString: String {
if let data = try? JSONSerialization.data(withJSONObject: toDictionary, options: [.sortedKeys]),
let result = String(data: data, encoding: .utf8)
{
return result
if let data = try? JSONSerialization.data(withJSONObject: toDictionary, options: [.sortedKeys]) {
return String(decoding: data, as: UTF8.self)
}

return "{}"
Expand Down

0 comments on commit 3119af7

Please sign in to comment.