Skip to content

Commit

Permalink
fix(editor): handle null editor assignment
Browse files Browse the repository at this point in the history
Handle null editor assignment in setEditor method. If editor is null, log an error and return early.
  • Loading branch information
phodal committed Sep 23, 2024
1 parent db34376 commit 3265042
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions web/core/lib/editor/action/AiActionExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ export class AiActionExecutor {
}

setEditor(editor: Editor) {
if (editor == null) {
console.error('editor is null, will not set it');
return;
}
this.editor = editor;
}

Expand Down

0 comments on commit 3265042

Please sign in to comment.