Kaynağa Gözat

ref: comments

Sv443 1 yıl önce
ebeveyn
işleme
da05803326
2 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 1 1
      src/features/menu/menu_old.ts
  2. 1 1
      src/index.ts

+ 1 - 1
src/features/menu/menu_old.ts

@@ -18,7 +18,7 @@ export async function addMenu() {
   backgroundElem.style.visibility = "hidden";
   backgroundElem.style.display = "none";
   backgroundElem.addEventListener("click", (e) => {
-    if((e.target as HTMLElement).id === "betterytm-menu-bg")
+    if((e.target as HTMLElement)?.id === "betterytm-menu-bg")
       closeMenu();
   });
   document.body.addEventListener("keydown", ({ key }) => {

+ 1 - 1
src/index.ts

@@ -92,7 +92,7 @@ async function onDomLoad() {
         initSiteSwitch(domain);
 
       try {
-        addMenu(); // TODO: remove
+        addMenu(); // TODO(v1.1): remove
       }
       catch(err) {
         error("Couldn't add menu:", err);