Skip to content

Commit

Permalink
Fix revert setting button for types "file"
Browse files Browse the repository at this point in the history
  • Loading branch information
Milkshiift committed Nov 19, 2024
1 parent 64ea99c commit fa9855e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/windows/settings/preload.mts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ export async function revertSetting(setting: HTMLElement) {
if (setting.type === "checkbox" && typeof defaultValue === "boolean") {
setting.checked = defaultValue;
} else if (setting.type === "file") {
setting.value = "";
void ipcRenderer.invoke("config:setConfig", elementName, defaultValue);
void ipcRenderer.invoke("flashTitlebar", "#5865F2");
return;
} else if (typeof defaultValue === "string") {
setting.value = defaultValue;
}
Expand Down

0 comments on commit fa9855e

Please sign in to comment.