mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 09:31:41 -05:00
Fix #2839: parse keys iff user config loaded
This commit is contained in:
parent
6d0810f2d5
commit
aa77f8d5aa
2 changed files with 4 additions and 1 deletions
|
@ -37,7 +37,7 @@ const CONFIGNAME = "userconfig"
|
|||
/** @hidden */
|
||||
const WAITERS = []
|
||||
/** @hidden */
|
||||
let INITIALISED = false
|
||||
export let INITIALISED = false
|
||||
|
||||
/** @hidden */
|
||||
// make a naked object
|
||||
|
|
|
@ -418,6 +418,9 @@ export function translateKeysInPlace(keys, conf): void {
|
|||
export function keyMap(conf): KeyMap {
|
||||
if (KEYMAP_CACHE[conf]) return KEYMAP_CACHE[conf]
|
||||
|
||||
// Fail silently and pass keys through to page if Tridactyl hasn't loaded yet
|
||||
if (!config.INITIALISED) return new Map()
|
||||
|
||||
const mapobj: { [keyseq: string]: string } = config.get(conf)
|
||||
if (mapobj === undefined)
|
||||
throw new Error(
|
||||
|
|
Loading…
Add table
Reference in a new issue