mirror of
https://github.com/videojs/video.js.git
synced 2025-01-31 11:26:45 +02:00
fix(dom): getBoundingClientRect check that el is defined (#4139)
Verify that el is defined so that we don't throw if we get to this function with an undefined el
This commit is contained in:
parent
a2b1a33606
commit
fb88ae2bfc
@ -484,7 +484,7 @@ export function unblockTextSelection() {
|
||||
* Always returns a plain
|
||||
*/
|
||||
export function getBoundingClientRect(el) {
|
||||
if (el.getBoundingClientRect && el.parentNode) {
|
||||
if (el && el.getBoundingClientRect && el.parentNode) {
|
||||
const rect = el.getBoundingClientRect();
|
||||
const result = {};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user