Skip to content

Commit

Permalink
CoreOffice#12 - Fix broken unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeMatt committed Feb 21, 2019
1 parent b1b096c commit c5af41b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/XMLCoder/Decoder/XMLKeyedDecodingContainer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ struct XMLKeyedDecodingContainer<K: CodingKey>: KeyedDecodingContainerProtocol {
) throws -> T {
let elementOrNil = container.withShared { keyedBox -> KeyedBox.Element? in
if ["value", ""].contains(key.stringValue) {
return keyedBox.value
return keyedBox.elements[key.stringValue] ?? keyedBox.value
} else {
return keyedBox.elements[key.stringValue]
}
Expand Down

0 comments on commit c5af41b

Please sign in to comment.