From 2319fbb601c1f095eeae5aab9a4ce9c9f7658256 Mon Sep 17 00:00:00 2001 From: tim h Date: Sun, 9 Jul 2023 08:36:34 -0500 Subject: [PATCH] shoddily fixes issue 232 --- js/initalize/workspace.populate.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/js/initalize/workspace.populate.js b/js/initalize/workspace.populate.js index 7c93722..f3faba3 100644 --- a/js/initalize/workspace.populate.js +++ b/js/initalize/workspace.populate.js @@ -97,10 +97,13 @@ workspaces.get(id).onsuccess = (e) => { const ws = e.target.result; if (ws) { - workspaces.put({id, workspace}).onsuccess = () => { - notifications.notify(`Workspace saved as '${ws.value.name}'`, { - type: "success", - }); + var name = ws.name; + workspaces.delete(id).onsuccess = () => { + workspaces.add({id, name, workspace}).onsuccess = () => { + notifications.notify(`Workspace saved as '${name}'`, { + type: "success", + }); + }; //workspaces.put is failing, delete and re-add? listWorkspaces(); }; }