Skip to content

Commit 85aba01

Browse files
committed
Fix if the command undefined
1 parent 9085af8 commit 85aba01

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

plugins/ckeditor5-woltlab-image/src/woltlabimage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ export class WoltlabImage extends Plugin {
155155
);
156156
}
157157

158-
#decorateCommand(command: Command) {
158+
#decorateCommand(command: Command | undefined) {
159159
const imageUtils: ImageUtils = this.editor.plugins.get("ImageUtils");
160-
command.on<ObservableSetEvent<boolean>>(
160+
command?.on<ObservableSetEvent<boolean>>(
161161
"set:isEnabled",
162162
(evt, _, value) => {
163163
if (!value) {

0 commit comments

Comments
 (0)