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:
parent
28b5f5bc1d
commit
6d2fa78767
File diff suppressed because one or more lines are too long
@ -33,7 +33,7 @@
|
|||||||
}(window.location))
|
}(window.location))
|
||||||
</script>
|
</script>
|
||||||
<!-- End Single Page Apps for GitHub Pages -->
|
<!-- End Single Page Apps for GitHub Pages -->
|
||||||
<script type="module" crossorigin src="/assets/main.a69c16ab.js"></script>
|
<script type="module" crossorigin src="/assets/main.1402b832.js"></script>
|
||||||
<link rel="modulepreload" href="/assets/vendor.30223de5.js">
|
<link rel="modulepreload" href="/assets/vendor.30223de5.js">
|
||||||
<link rel="stylesheet" href="/assets/vendor.17033500.css">
|
<link rel="stylesheet" href="/assets/vendor.17033500.css">
|
||||||
<link rel="stylesheet" href="/assets/main.eae1741b.css">
|
<link rel="stylesheet" href="/assets/main.eae1741b.css">
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
const api = new PKAPI();
|
const api = new PKAPI();
|
||||||
try {
|
try {
|
||||||
let res = await api.patchGroup({token: localStorage.getItem("pk-token"), id: group.id, data: data});
|
let res = await api.patchGroup({token: localStorage.getItem("pk-token"), id: group.id, data: data});
|
||||||
group = res;
|
group = {...group, ...res};
|
||||||
err = [];
|
err = [];
|
||||||
update();
|
update();
|
||||||
editMode = false;
|
editMode = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user