File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- var xml2js = require ( 'xml2js' ) ,
4
- typeis = require ( 'type-is' ) ;
3
+ var xml2js = require ( 'xml2js' ) ;
5
4
6
5
module . exports = function ( bodyParser ) {
7
6
if ( bodyParser . xml ) {
@@ -21,7 +20,7 @@ module.exports = function(bodyParser) {
21
20
// First, run the body through the text parser.
22
21
textParser ( req , res , function ( err ) {
23
22
if ( err ) { return next ( err ) ; }
24
- if ( ! typeis ( req , xmlTypes ) ) { return next ( ) ; }
23
+ if ( typeof req . body !== 'string' ) { return next ( ) ; }
25
24
26
25
// Then, parse as XML.
27
26
var parser = new xml2js . Parser ( options . xmlParseOptions ) ;
Original file line number Diff line number Diff line change 22
22
},
23
23
"homepage" : " https://github.com/fiznool/body-parser-xml#readme" ,
24
24
"dependencies" : {
25
- "type-is" : " ^1.6.10" ,
26
25
"xml2js" : " ^0.4.15"
27
26
},
28
27
"devDependencies" : {
You can’t perform that action at this time.
0 commit comments