Ver código fonte

fix: menu init getting stuck on buttons

Sv443 3 meses atrás
pai
commit
7e908b7838
1 arquivos alterados com 2 adições e 5 exclusões
  1. 2 5
      src/menu/menu_old.ts

+ 2 - 5
src/menu/menu_old.ts

@@ -279,8 +279,8 @@ async function mountCfgMenu() {
 
   const onCfgChange = async (
     key: keyof typeof defaultData,
-    initialVal: string | number | boolean | HotkeyObj,
-    newVal: string | number | boolean | HotkeyObj,
+    initialVal: string | number | boolean | HotkeyObj | undefined,
+    newVal: string | number | boolean | HotkeyObj | undefined,
   ) => {
     try {
       const fmt = (val: unknown) => typeof val === "object" ? JSON.stringify(val) : String(val);
@@ -667,9 +667,6 @@ async function mountCfgMenu() {
           // custom input element:
           let customInputEl: HTMLElement | undefined;
 
-          if(initialVal === undefined)
-            return;
-
           switch(type) {
           case "hotkey":
             customInputEl = createHotkeyInput({