Ghost Shell

JavaScript NOASSERTION

Stars
0
Forks
0
Downloads
N/A
Open Issues
0
Files main

Repository Files

Loading file structure...
src/lib/tauri.js
import { invoke as tauriInvoke } from "@tauri-apps/api/core";

/** Invoke that ignores stale-callback errors after HMR / page reload. */
export async function invoke(cmd, args) {
  try {
    return await tauriInvoke(cmd, args);
  } catch (err) {
    const message = String(err);
    if (message.includes("Couldn't find callback id")) return;
    throw err;
  }
}