radiantmediaplayer / rmp-vast

A client-side JavaScript solution to load, parse and display VAST 2, 3 & 4 resources with HTML5 video
https://www.radiantmediaplayer.com/rmp-vast/app/
Other
95 stars 37 forks source link

Check for this.container before querySelector call #29

Closed mcmimik closed 3 years ago

mcmimik commented 4 years ago

When searching for a container element by id, it may not exist and return null, so when searching for a contentWrapper element (line 26), querySelector may cause an exception:

https://github.com/radiantmediaplayer/rmp-vast/blob/3f2e216d1fda7b3dbac1c7cc0158ca8266712886/js/src/module.js#L25-L33

Maybe it would be more reliable to check for this.container === null before contentWrapper assignment.

radiantmediaplayer commented 3 years ago

Hi, Thanks for bringing this to our attention. I will fix this for the next release.

radiantmediaplayer commented 3 years ago

Fixed in v3.0.0