fix: update error handling to avoid unused catch variables and improve code clarity

This commit is contained in:
shiyu
2025-12-18 15:51:20 +08:00
parent b582a89d08
commit 7c38c0045b
26 changed files with 130 additions and 113 deletions

View File

@@ -133,12 +133,13 @@ export async function ensureManifest(pluginId: number, plugin: RegisteredPlugin)
website: plugin.website,
github: plugin.github,
};
try { console.debug('[foxel] report manifest', pluginId, manifest); } catch { }
try { console.debug('[foxel] report manifest', pluginId, manifest); } catch { void 0; }
const key = `foxel:manifestReported:${pluginId}`;
if (sessionStorage.getItem(key) === '1') return;
try {
await pluginsApi.updateManifest(pluginId, manifest);
sessionStorage.setItem(key, '1');
} catch {
void 0;
}
}