diff --git a/misc/dist/html/editor.html b/misc/dist/html/editor.html
index e5c68c63384c..5959b7b66439 100644
--- a/misc/dist/html/editor.html
+++ b/misc/dist/html/editor.html
@@ -701,9 +701,14 @@
Important - Please read
editor = new Engine(editorConfig);
function displayFailureNotice(err) {
- const msg = err.message || err;
- console.error(msg);
- setStatusNotice(msg);
+ console.error(err);
+ if (err instanceof Error) {
+ setStatusNotice(err.message);
+ } else if (typeof err === 'string') {
+ setStatusNotice(err);
+ } else {
+ setStatusNotice('An unknown error occured');
+ }
setStatusMode('notice');
initializing = false;
}
diff --git a/misc/dist/html/full-size.html b/misc/dist/html/full-size.html
index fc34164368ad..1d76abe0a562 100644
--- a/misc/dist/html/full-size.html
+++ b/misc/dist/html/full-size.html
@@ -134,9 +134,14 @@
}
function displayFailureNotice(err) {
- const msg = err.message || err;
- console.error(msg);
- setStatusNotice(msg);
+ console.error(err);
+ if (err instanceof Error) {
+ setStatusNotice(err.message);
+ } else if (typeof err === 'string') {
+ setStatusNotice(err);
+ } else {
+ setStatusNotice('An unknown error occured');
+ }
setStatusMode('notice');
initializing = false;
}