MDL-82181 tiny_media: correctly determine whether to show dropzone.

This commit is contained in:
Paul Holden
2024-06-12 14:19:47 +01:00
parent db07c09afc
commit c8bdae260b
3 changed files with 4 additions and 3 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -55,7 +55,8 @@ export default class MediaImage {
&& (typeof options !== 'undefined')
&& Object.keys(options.repositories).length > 0;
// Indicates whether the drop zone area can be shown.
this.canShowDropZone = Object.values(options.repositories).some(repository => repository.type === 'upload');
this.canShowDropZone = (typeof options !== 'undefined') &&
Object.values(options.repositories).some(repository => repository.type === 'upload');
this.editor = editor;
}