fix: standalone@2.1.2: fix #158

This commit is contained in:
tiago
2026-01-11 13:30:23 +00:00
parent c86cc6ad40
commit dc51bafc0d
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "cap-standalone",
"version": "2.1.1",
"version": "2.1.2",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "bun run --watch src/index.js",
+3 -2
View File
@@ -28,8 +28,9 @@ const api = async (method, path, body) => {
opts.body = JSON.stringify(body);
}
return await await fetch(`/server${path}`, opts).json();
return await (await fetch(`/server${path}`, opts)).json();
} catch (e) {
console.error("standalone:", e)
return { error: e.message };
}
};
@@ -91,7 +92,7 @@ async function loadKeys() {
location.reload();
return;
}
if (keys.error) {
if (keys?.error) {
keysList.innerHTML = `<div class="keys-empty"><p>Error loading keys</p></div>`;
return;
}