Skip to content

Commit 932f4e8

Browse files
Cyperghostdtdesign
authored andcommitted
Fix if the command undefined
1 parent 99660d9 commit 932f4e8

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
@@ -152,9 +152,9 @@ export class WoltlabImage extends Plugin {
152152
);
153153
}
154154

155-
#decorateCommand(command: Command) {
155+
#decorateCommand(command: Command | undefined) {
156156
const imageUtils: ImageUtils = this.editor.plugins.get("ImageUtils");
157-
command.on<ObservableSetEvent<boolean>>(
157+
command?.on<ObservableSetEvent<boolean>>(
158158
"set:isEnabled",
159159
(evt, _, value) => {
160160
if (!value) {

0 commit comments

Comments
 (0)