mirror of
https://github.com/tridactyl/tridactyl.git
synced 2026-09-10 07:16:33 -04:00
Swap icky stringification for a proper clone
This commit is contained in:
parent
e921cb901e
commit
b742bbeab5
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"firefox": {
|
||||
"minimumVersion": "91.1.0",
|
||||
"minimumVersion": "94.0",
|
||||
"manifestVersionPath": [
|
||||
"applications",
|
||||
"gecko",
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ import * as binding from "@src/lib/binding"
|
|||
import * as platform from "@src/lib/platform"
|
||||
import { DeepPartial } from "tsdef"
|
||||
|
||||
declare function structuredClone<T>(value: T): T // delete me once we move off typescript 3
|
||||
|
||||
/* Remove all nulls from objects recursively
|
||||
* NB: also applies to arrays
|
||||
*/
|
||||
|
|
@ -2205,7 +2207,7 @@ export async function clear() {
|
|||
*/
|
||||
export async function save() {
|
||||
const settingsobj = o({})
|
||||
settingsobj[CONFIGNAME] = JSON.parse(JSON.stringify(USERCONFIG))
|
||||
settingsobj[CONFIGNAME] = structuredClone(USERCONFIG)
|
||||
return store(() => browser.storage.local.set(settingsobj))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue