Fix arbitrary access to reminder list.
This commit is contained in:
@ -427,6 +427,14 @@ document.addEventListener("guildSwitched", async (e) => {
|
||||
`.switch-pane[data-guild="${e.detail.guild_id}"]`
|
||||
);
|
||||
|
||||
let hasError = false;
|
||||
|
||||
if ($anchor === null) {
|
||||
switch_pane("user-error");
|
||||
hasError = true;
|
||||
return;
|
||||
}
|
||||
|
||||
switch_pane($anchor.dataset["pane"]);
|
||||
reset_guild_pane();
|
||||
$anchor.classList.add("is-active");
|
||||
@ -437,7 +445,7 @@ document.addEventListener("guildSwitched", async (e) => {
|
||||
.forEach((el) => el.classList.remove("is-locked"));
|
||||
}
|
||||
|
||||
let hasError = await fetch_channels(e.detail.guild_id);
|
||||
hasError = await fetch_channels(e.detail.guild_id);
|
||||
if (!hasError) {
|
||||
fetch_roles(e.detail.guild_id);
|
||||
fetch_templates(e.detail.guild_id);
|
||||
|
Reference in New Issue
Block a user