diff --git a/standalone/package.json b/standalone/package.json index 22cbbe1..7777adb 100644 --- a/standalone/package.json +++ b/standalone/package.json @@ -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", diff --git a/standalone/public/js/dashboard.js b/standalone/public/js/dashboard.js index a2fa6db..74a770a 100644 --- a/standalone/public/js/dashboard.js +++ b/standalone/public/js/dashboard.js @@ -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 = `

Error loading keys

`; return; }