fix(server): improved handling for missing files on Firefox

This commit is contained in:
Elian Doran 2025-01-04 17:12:55 +02:00
parent 5ee6ba8cb0
commit 0bb573022a
No known key found for this signature in database
3 changed files with 13 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -197,7 +197,15 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {
const notificationsPlugin = editor.plugins.get("Notification");
notificationsPlugin.on("show:warning", (evt, data) => {
toast.showErrorTitleAndMessage(data.title, data.message.message);
const title = data.title;
const message = data.message.message;
if (title && message) {
toast.showErrorTitleAndMessage(data.title, data.message.message);
} else if (title) {
toast.showError(title || message);
}
evt.stop();
});