Closed mcmimik closed 3 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:
container
null
contentWrapper
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.
this.container === null
Hi, Thanks for bringing this to our attention. I will fix this for the next release.
Fixed in v3.0.0
When searching for a
container
element by id, it may not exist and returnnull
, so when searching for acontentWrapper
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
beforecontentWrapper
assignment.