mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-23 19:49:56 +01:00
web: fix empty command palette/quick open when locked note active (#9200)
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
This commit is contained in:
@@ -50,7 +50,7 @@ class EditorManager extends BaseStore<EditorManager> {
|
||||
zoom: EDITOR_ZOOM.DEFAULT,
|
||||
lineHeight: EDITOR_LINE_HEIGHT.DEFAULT
|
||||
});
|
||||
editors: Record<string, EditorContext> = {};
|
||||
editors: Record<string, EditorContext | undefined> = {};
|
||||
|
||||
getEditor = (id: string): EditorContext | undefined => {
|
||||
return this.get().editors[id];
|
||||
|
||||
@@ -432,7 +432,7 @@ function getEditorCommands(): Command[] {
|
||||
}
|
||||
];
|
||||
|
||||
if (session.type !== "readonly" && (editor.canUndo || editor.canRedo)) {
|
||||
if (session.type !== "readonly" && (editor?.canUndo || editor?.canRedo)) {
|
||||
commands.push(
|
||||
{
|
||||
id: "undo",
|
||||
|
||||
Reference in New Issue
Block a user