Skip to content

Commit b94914a

Browse files
committed
Allow initialization of keyed properties for empty, but defined XML elements
1 parent 7955f27 commit b94914a

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

Sources/XMLKit/XMLDecoder/XMLKeyedDecodingContainer.swift

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,6 @@ class XMLKeyedDecodingContainer<Key: CodingKey>: KeyedDecodingContainerProtocol
6666
return node.children?.isEmpty == true
6767
}
6868

69-
// Get the child element matching the given key
70-
// Avoids initialization if all variables are nil.
71-
if let child = node.child(for: key.stringValue),
72-
child.text?.isEmpty ?? true,
73-
child.children?.isEmpty ?? true
74-
{
75-
return true
76-
}
77-
7869
// If the element has some content (either text or children), it's not 'nil'
7970
return false
8071
}

0 commit comments

Comments
 (0)