mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 01:51:40 -05:00
Throw error if unsupported setting is set with setmode
This commit is contained in:
parent
8a679fb9ba
commit
6adb6879f0
1 changed files with 2 additions and 0 deletions
|
@ -3796,6 +3796,8 @@ export function setmode(mode: string, key: string, ...values: string[]) {
|
|||
if (!mode || !key || !values.length) {
|
||||
throw new Error("seturl syntax: mode key value")
|
||||
}
|
||||
if (key !== "allowautofocus")
|
||||
throw new Error("Setting '" + key + "' not supported with setmode")
|
||||
|
||||
return config.set("modesubconfigs", mode, ...validateSetArgs(key, values))
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue