mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
fix(dashboard): fix crash when searching after member creation
This commit is contained in:
parent
30f3dcf031
commit
f84f7eacdd
1 changed files with 5 additions and 6 deletions
|
|
@ -38,8 +38,8 @@
|
|||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
function create() {
|
||||
dispatch('create', input);
|
||||
function create(data: Member) {
|
||||
dispatch('create', data);
|
||||
}
|
||||
|
||||
async function submit() {
|
||||
|
|
@ -89,11 +89,10 @@
|
|||
loading = true;
|
||||
try {
|
||||
let res = await api().members().post({data});
|
||||
input = res;
|
||||
err = [];
|
||||
create();
|
||||
input = JSON.parse(JSON.stringify(defaultMember));;
|
||||
create(res);
|
||||
input = JSON.parse(JSON.stringify(defaultMember));
|
||||
message = `Member ${data.name} successfully created!`
|
||||
err = [];
|
||||
loading = false;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue