mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 04:27:15 +03:00
Fix potential null issue
This commit is contained in:
@@ -343,6 +343,7 @@ export default class Utils {
|
||||
//for embeds
|
||||
const player = document.getElementById("player");
|
||||
referenceNode = player.firstChild as HTMLElement;
|
||||
if (referenceNode) {
|
||||
let index = 1;
|
||||
|
||||
//find the child that is the video player (sometimes it is not the first)
|
||||
@@ -352,6 +353,7 @@ export default class Utils {
|
||||
index++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return referenceNode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user