Skip to content

Commit e4b5d96

Browse files
committed
Checking for typeof bodyContent in getXmlVersionContent, expecting to be string
1 parent 3245254 commit e4b5d96

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/schemaUtils.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2099,6 +2099,7 @@ module.exports = {
20992099
}
21002100
else {
21012101
let getXmlVersionContent = (bodyContent) => {
2102+
bodyContent = (typeof bodyContent === 'string') ? bodyContent : '';
21022103
const regExp = new RegExp('([<\\?xml]+[\\s{1,}]+[version="\\d.\\d"]+[\\sencoding="]+.{1,15}"\\?>)');
21032104
let xmlBody = bodyContent;
21042105

0 commit comments

Comments
 (0)