Skip to content

Commit 338362b

Browse files
authored
fix: display actual error text instead of placeholder (#7755)
1 parent 760a08d commit 338362b

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

js/activity/alert-renderer.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,14 @@ class AlertRenderer {
218218
}
219219

220220
activity.errorMsgText.parent.visible = true;
221+
activity.errorMsgText.text = msg;
222+
if (typeof activity.errorMsgText.parent.updateCache === "function") {
223+
activity.errorMsgText.parent.updateCache();
224+
}
225+
activity.stage.setChildIndex(
226+
activity.errorMsgText.parent,
227+
activity.stage.children.length - 1
228+
);
221229
if (
222230
blk !== undefined &&
223231
blk !== null &&
@@ -260,6 +268,9 @@ class AlertRenderer {
260268
head.rotation = angle;
261269
}
262270

271+
activity.errorText.classList.add("show");
272+
activity.errorTextContent.textContent = msg;
273+
263274
switch (msg) {
264275
case NOMICERRORMSG:
265276
activity.errorArtwork["nomicrophone"].visible = true;
@@ -336,10 +347,6 @@ class AlertRenderer {
336347
activity.stage.children.length - 1
337348
);
338349
break;
339-
default:
340-
activity.errorText.classList.add("show");
341-
activity.errorTextContent.textContent = msg;
342-
break;
343350
}
344351
activity.refreshCanvas();
345352
}

0 commit comments

Comments
 (0)