From dc51bafc0d04a17ec1728760a69a721f54e65ec6 Mon Sep 17 00:00:00 2001 From: tiago <70700766+tiagozip@users.noreply.github.com> Date: Sun, 11 Jan 2026 13:30:23 +0000 Subject: [PATCH] fix: standalone@2.1.2: fix #158 --- standalone/package.json | 2 +- standalone/public/js/dashboard.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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; }