diff --git a/src/native/ResourceWindowApp.tsx b/src/native/ResourceWindowApp.tsx index 74afb7a..3346db9 100644 --- a/src/native/ResourceWindowApp.tsx +++ b/src/native/ResourceWindowApp.tsx @@ -66,7 +66,7 @@ export function ResourceWindowApp() { return (...args: unknown[]) => { void import("@tauri-apps/api/event").then(({ emitTo }) => emitTo("main", "resource-command", { name: prop as HandlerName, args }).catch( - () => {}, + (err) => console.error("[resource-window] emit resource-command failed", prop, err), ), ); }; diff --git a/src/native/resourceWindow.ts b/src/native/resourceWindow.ts index a3474c1..1c79bd6 100644 --- a/src/native/resourceWindow.ts +++ b/src/native/resourceWindow.ts @@ -85,7 +85,11 @@ export function useResourceWindowHost( unlisten.push( await listen<{ name: string; args: unknown[] }>("resource-command", (e) => { const fn = (handlersRef.current as unknown as Record)[e.payload.name]; - if (typeof fn === "function") (fn as (...a: unknown[]) => void)(...e.payload.args); + if (typeof fn === "function") { + (fn as (...a: unknown[]) => void)(...e.payload.args); + } else { + console.error("[resource-window-host] unknown resource-command", e.payload.name); + } }), ); unlisten.push( diff --git a/src/ui/ResourceManager.tsx b/src/ui/ResourceManager.tsx index 03e597e..f4eb808 100644 --- a/src/ui/ResourceManager.tsx +++ b/src/ui/ResourceManager.tsx @@ -977,7 +977,7 @@ function ComponentsTab({
{t("resources.components.empty")}
)}
-
@@ -1246,7 +1246,7 @@ function HatchesTab({
{t("resources.hatches.empty")}
)}
- {t("resources.lines.empty")}
)}
- {t(emptyKey)}
)}
-