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

Commit ed049a2

Browse files
committed
coerce may be boolean or object
1 parent bd70647 commit ed049a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/xml2json.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ module.exports = function(xml, _options) {
144144
var schema = {
145145
object: joi.boolean().default(false),
146146
reversible: joi.boolean().default(false),
147-
coerce: joi.boolean().default(true),
147+
coerce: joi.alternatives([joi.boolean(), joi.object()]).default(true),
148148
sanitize: joi.boolean().default(true),
149149
trim: joi.boolean().default(true),
150150
arrayNotation: joi.boolean().default(false)

0 commit comments

Comments
 (0)