File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -447,12 +447,14 @@ export class VASTParser extends EventEmitter {
447
447
} else {
448
448
for ( let index = vastResponse . ads . length - 1 ; index >= 0 ; index -- ) {
449
449
// - Error encountered while parsing
450
- // - No Creative case - The parser has dealt with soma <Ad><Wrapper> or/and an <Ad><Inline> elements
450
+ // - No Creative case - The parser has dealt with some <Ad><Wrapper> or/and an <Ad><Inline> elements
451
451
// but no creative was found
452
452
const ad = vastResponse . ads [ index ] ;
453
453
const noMediaFilesAvailable = ! ad . creatives . some (
454
- ( creative ) => creative . mediaFiles ?. length > 0
454
+ ( creative ) =>
455
+ creative . mediaFiles ?. length > 0 || creative . variations ?. length > 0
455
456
) ;
457
+
456
458
if ( ( ad . errorCode || noMediaFilesAvailable ) && ! ad . VASTAdTagURI ) {
457
459
// If VASTAdTagURI is in the vastResponse, it means we are dealing with a Wrapper when using parseVAST from the VASTParser.
458
460
// In that case, we dont want to modify the vastResponse since the creatives node is not required in a wrapper.
You can’t perform that action at this time.
0 commit comments