Skip to content

Commit

Permalink
Merge pull request #718 from aman-v-singh/fix/IMPORT-1029-type-error-…
Browse files Browse the repository at this point in the history
…openapi-3-0-cannot-read-properties-of-null-reading-match

[FIX/IMPORT-1029] - Checking typeof bodyContent in getXmlVersionContent
  • Loading branch information
VShingala committed May 10, 2023
2 parents b010216 + e4b5d96 commit d7edb43
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/schemaUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2097,6 +2097,7 @@ module.exports = {
}
else {
let getXmlVersionContent = (bodyContent) => {
bodyContent = (typeof bodyContent === 'string') ? bodyContent : '';
const regExp = new RegExp('([<\\?xml]+[\\s{1,}]+[version="\\d.\\d"]+[\\sencoding="]+.{1,15}"\\?>)');
let xmlBody = bodyContent;

Expand Down

0 comments on commit d7edb43

Please sign in to comment.