add saved bot to opponent list
This commit is contained in:
parent
41f1679ef4
commit
9f24a6184e
1 changed files with 5 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue