Merge branch 'MDL-82181-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE

This commit is contained in:
Sara Arjona
2024-06-19 15:42:27 +02:00
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;
}