Explorar o código

fix: menu init getting stuck on buttons

Sv443 hai 3 meses
pai
achega
7e908b7838
Modificáronse 1 ficheiros con 2 adicións e 5 borrados
  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({