Skip to content

Commit c976028

Browse files
committed
Fixed CodingKey.sanitizedName
1 parent 8f05e88 commit c976028

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Sources/JavaScriptKit/Extensions/CodingKey.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ internal extension CodingKey {
2222
guard elements.count > 2
2323
else { return rawName }
2424
elements.removeFirst()
25-
// FIXME: Needs Foundation for String extensions
26-
//elements.removeAll { $0.contains("(unknown context") }
25+
elements.removeAll { $0.hasPrefix("(unknown context") }
2726
return elements.reduce("", { $0 + ($0.isEmpty ? "" : ".") + $1 })
2827
}
2928
}

0 commit comments

Comments
 (0)