mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
fix(dashboard): fix undefined name after creation
This commit is contained in:
parent
f84f7eacdd
commit
43b6792e30
1 changed files with 4 additions and 4 deletions
|
|
@ -26,8 +26,8 @@
|
|||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
function create() {
|
||||
dispatch('create', input);
|
||||
function create(data: Group) {
|
||||
dispatch('create', data);
|
||||
}
|
||||
|
||||
let input: Group = JSON.parse(JSON.stringify(defaultGroup));
|
||||
|
|
@ -51,10 +51,10 @@
|
|||
loading = true;
|
||||
try {
|
||||
let res = await api().groups().post({data});
|
||||
create(res);
|
||||
input = JSON.parse(JSON.stringify(defaultGroup));
|
||||
err = [];
|
||||
create();
|
||||
message = `Group ${data.name} successfully created!`
|
||||
err = [];
|
||||
loading = false;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue