mirror of
https://github.com/codex-team/editor.js
synced 2026-03-14 14:45:47 +01:00
Swallow getLayoutMap() error (#2790)
* Fix getLayoutMap() bug * Update CHANGELOG.md --------- Co-authored-by: Angus <angus@coefficient.io> Co-authored-by: Peter <specc.dev@gmail.com>
This commit is contained in:
parent
c82933616c
commit
2f9696a000
2 changed files with 11 additions and 3 deletions
|
|
@ -3,6 +3,7 @@
|
|||
### 2.30.6
|
||||
|
||||
– `Fix` – Fix the display of ‘Convert To’ near blocks that do not have the ‘conversionConfig.export’ rule specified
|
||||
– `Fix` – The Plus button does not appear when the editor is loaded in an iframe in Chrome
|
||||
|
||||
### 2.30.5
|
||||
|
||||
|
|
|
|||
|
|
@ -47,8 +47,15 @@ export async function getKeyboardKeyForCode(code: string, fallback: string): Pro
|
|||
return fallback;
|
||||
}
|
||||
|
||||
const map = await keyboard.getLayoutMap();
|
||||
const key = map.get(code);
|
||||
try {
|
||||
const map = await keyboard.getLayoutMap();
|
||||
|
||||
return key || fallback;
|
||||
const key = map.get(code);
|
||||
|
||||
return key || fallback;
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
||||
return fallback;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue