diff --git a/docs/changelog.md b/docs/changelog.md index 348c314..e3d0469 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -2,7 +2,11 @@ Here are the most notable changes in each release. For a more detailed list of changes, see the [Github Releases page](https://github.com/heyman/heynote/releases). -## 2.6.0 (not yet released) +## 2.6.1 + +- Fix crash when no custom key binding had been set + +## 2.6.0 - Add setting for rendering white-space (spaces as dots and tabs as arrows) - Show key bindings in Command Palette diff --git a/src/editor/keymap.js b/src/editor/keymap.js index 1730c88..80f5966 100644 --- a/src/editor/keymap.js +++ b/src/editor/keymap.js @@ -209,7 +209,7 @@ function keymapFromSpec(specs, editor) { function getCombinedKeymapSpec(keymapName, userKeymap) { return [ - ...userKeymap, + ...(userKeymap ? userKeymap : []), ...(keymapName === "emacs" ? [...EMACS_KEYMAP, ...DEFAULT_KEYMAP] : [...DEFAULT_NOT_EMACS_KEYMAP, ...DEFAULT_KEYMAP]), ] }