aboutsummaryrefslogtreecommitdiff
path: root/web/pw-server/src/lib/components/SubmitPane.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'web/pw-server/src/lib/components/SubmitPane.svelte')
-rw-r--r--web/pw-server/src/lib/components/SubmitPane.svelte5
1 files changed, 5 insertions, 0 deletions
diff --git a/web/pw-server/src/lib/components/SubmitPane.svelte b/web/pw-server/src/lib/components/SubmitPane.svelte
index 20a6a39..740f2cf 100644
--- a/web/pw-server/src/lib/components/SubmitPane.svelte
+++ b/web/pw-server/src/lib/components/SubmitPane.svelte
@@ -72,6 +72,11 @@
if (response.ok) {
dispatch("botSaved", responseData);
saveBotName(botName);
+
+ // make bot available in available bot list
+ if (!availableBots.find((bot) => bot["id"] == responseData["id"])) {
+ availableBots = [...availableBots, responseData];
+ }
// clear errors
saveErrors = [];
} else {