Skip to content

Commit

Permalink
fix: Fix build Circle CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Kola-Kola committed Oct 11, 2021
1 parent 81a3dc3 commit 84d3af1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions modules/bliinkBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,14 @@ export const parseXML = (content) => {
if (typeof content !== 'string' || content.length === 0) return null

const parser = new DOMParser()
const xml = (parser && parser.parseFromString && parser.parseFromString(content, 'text/xml')) || ''
if (parser) {
const xml = (parser && parser.parseFromString && parser.parseFromString(content, 'text/xml')) || ''

if (xml &&
xml.getElementsByTagName('VAST')[0] &&
xml.getElementsByTagName('VAST')[0].tagName === 'VAST') {
return xml
if (xml &&
xml.getElementsByTagName('VAST')[0] &&
xml.getElementsByTagName('VAST')[0].tagName === 'VAST') {
return xml
}
}

return null
Expand Down

0 comments on commit 84d3af1

Please sign in to comment.