Przeglądaj źródła

Update imageUploadCommand

panr 5 lat temu
rodzic
commit
1faf5523c3

+ 1 - 1
packages/ckeditor5-image/src/imageupload/imageuploadcommand.js

@@ -45,7 +45,7 @@ export default class ImageUploadCommand extends Command {
 	 */
 	 */
 	refresh() {
 	refresh() {
 		const imageElement = this.editor.model.document.selection.getSelectedElement();
 		const imageElement = this.editor.model.document.selection.getSelectedElement();
-		const isImage = imageElement && imageElement.name === 'image';
+		const isImage = imageElement && imageElement.name === 'image' || false;
 
 
 		this.isEnabled = isImageAllowed( this.editor.model ) || isImage;
 		this.isEnabled = isImageAllowed( this.editor.model ) || isImage;
 	}
 	}