extension: Stop "Reset Settings" removing responseHeadersUnsupported

This commit is contained in:
Daniel Jacobs 2024-08-09 15:31:18 -04:00
parent 23d4a61fbd
commit 52ef345dae
1 changed files with 8 additions and 1 deletions

View File

@ -202,5 +202,12 @@ export async function bindOptions(
}
export async function resetOptions(): Promise<void> {
utils.storage.sync.clear();
// This setting is consistent for the browser in use and should not change
const data = await utils.storage.sync.get({
responseHeadersUnsupported: false,
});
await utils.storage.sync.clear();
if (data["responseHeadersUnsupported"]) {
utils.storage.sync.set({ responseHeadersUnsupported: true });
}
}