Skip to content

Commit 2f9696a

Browse files
damacisaacAngusneSpecc
authored
Swallow getLayoutMap() error (codex-team#2790)
* Fix getLayoutMap() bug * Update CHANGELOG.md --------- Co-authored-by: Angus <[email protected]> Co-authored-by: Peter <[email protected]>
1 parent c829336 commit 2f9696a

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

docs/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### 2.30.6
44

55
`Fix` – Fix the display of ‘Convert To’ near blocks that do not have the ‘conversionConfig.export’ rule specified
6+
`Fix` – The Plus button does not appear when the editor is loaded in an iframe in Chrome
67

78
### 2.30.5
89

src/components/utils/keyboard.ts

+10-3
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,15 @@ export async function getKeyboardKeyForCode(code: string, fallback: string): Pro
4747
return fallback;
4848
}
4949

50-
const map = await keyboard.getLayoutMap();
51-
const key = map.get(code);
50+
try {
51+
const map = await keyboard.getLayoutMap();
5252

53-
return key || fallback;
53+
const key = map.get(code);
54+
55+
return key || fallback;
56+
} catch (e) {
57+
console.error(e);
58+
59+
return fallback;
60+
}
5461
}

0 commit comments

Comments
 (0)