fix: use spread syntax when updating groups in browser after edit

After editing a group, there would be no members in the group member list anymore. Turns out I was overwriting the member list when patching a group. oops.
This commit is contained in:
Spectralitree
2022-01-26 21:06:50 +01:00
parent 28b5f5bc1d
commit 6d2fa78767
3 changed files with 8 additions and 8 deletions

View File

@@ -42,7 +42,7 @@
const api = new PKAPI();
try {
let res = await api.patchGroup({token: localStorage.getItem("pk-token"), id: group.id, data: data});
group = res;
group = {...group, ...res};
err = [];
update();
editMode = false;