|
@@ -49,7 +49,7 @@ export default class MUCConfigModal extends BaseModal {
|
|
|
const form_data = new FormData(/** @type {HTMLFormElement} */ (ev.target));
|
|
|
const image_file = /** @type {File} */ (form_data.get('avatar_image'));
|
|
|
|
|
|
- if (image_file.size) {
|
|
|
+ if (image_file?.size) {
|
|
|
const image_data = isImageWithAlphaChannel ? image_file : await compressImage(image_file);
|
|
|
const reader = new FileReader();
|
|
|
reader.onloadend = async () => {
|