Skip to content
This repository was archived by the owner on Jan 7, 2021. It is now read-only.

Commit 3b1e556

Browse files
committed
Do not attempt to coerce empty strings. Closes #54
1 parent a61e582 commit 3b1e556

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/xml2json.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function endElement(name) {
8585
}
8686

8787
function coerce(value) {
88-
if (!options.coerce) {
88+
if (!options.coerce || value.trim() === '') {
8989
return value;
9090
}
9191

0 commit comments

Comments
 (0)