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:
01zulfi
2026-01-14 10:53:00 +05:00
committed by GitHub
parent 69ea9992ce
commit a6032ffd72
2 changed files with 2 additions and 2 deletions

View File

@@ -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];

View File

@@ -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",