Merge pull request #229 from mphelp/issue-199

Fix Issue 199: (Bug): Cannot read properties of null (reading 'offsetParent')
This commit is contained in:
Dmitrii Selivanov authored and GitHub committed 2021-12-07 01:21:21 +03:00
commit 6da6e73698
3 files changed
+3 -3

No files matched your search

@@ -20,7 +20,7 @@ function cLog(message, writer) {
function getButtons() {
//--- If Menu Element Is Displayed: ---//
if (document.getElementById("menu-container").offsetParent === null) {
if (document.getElementById("menu-container")?.offsetParent === null) {
return document.querySelector("ytd-menu-renderer.ytd-watch-metadata > div");
//--- If Menu Element Isnt Displayed: ---//
} else {