Skip to content
6 changes: 3 additions & 3 deletions app/ui-utils/client/lib/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ const createModal = (config = {}, fn, onCancel) => {
},

close: () => {
if (onCancel) {
onCancel.call(instance);
}
instance.destroy();
modalStack = modalStack.filter((modal) => modal !== instance);
if (modalStack.length) {
Expand All @@ -89,9 +92,6 @@ const createModal = (config = {}, fn, onCancel) => {
},

cancel: () => {
if (onCancel) {
onCancel.call(instance);
}
instance.close();
},

Expand Down
1 change: 1 addition & 0 deletions app/ui/client/lib/chatMessages.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ export class ChatMessages {
const file = new File([messageBlob], fileName, { type: contentType, lastModified: Date.now() });
fileUpload([{ file, name: fileName }], this.input, { rid, tmid });
} catch (e) {
messageBoxState.set(this.input, msg);
return true;
}
return true;
Expand Down