mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-20 17:13:49 +00:00
fix(console): retain undisplayed forge sources
An editor that only displays some providers must preserve the others. Keep stored custom sources when saving unrelated group settings.
This commit is contained in:
1 parent
94b47da859
commit
f8dbb8ec0b
1 file changed
+6
-1
@@ -418,7 +418,12 @@ function save(): void {
|
||||
members,
|
||||
adminIds: members.filter((m) => m.role === "owner").map((m) => m.login),
|
||||
owners: props.superAdmin ? (owners.length ? owners : undefined) : props.group?.owners,
|
||||
providers: form.providers.length ? form.providers : undefined,
|
||||
// Sources the form does not offer (e.g. "custom") are kept as they were.
|
||||
providers: (() => {
|
||||
const kept = (props.group?.providers ?? []).filter((p) => p !== "github" && p !== "gitea");
|
||||
const all = [...form.providers, ...kept];
|
||||
return all.length ? all : undefined;
|
||||
})(),
|
||||
installationId,
|
||||
emoji: form.emoji,
|
||||
forgeSources: form.forgeSources.length
|
||||
|
||||
Reference in new issue
Block a user