Fixed bug where the alert box would try to show a message even if there was none

This commit is contained in:
nuttylmao
2025-05-08 03:28:16 +10:00
parent 782cd412bf
commit c49db38ad8
+7 -1
View File
@@ -1267,7 +1267,13 @@ function UpdateAlertBox(platform, avatarURL, headerText, descriptionText, attrib
alertBox.style.transition = 'all 0.5s ease-in-out';
theContentThatShowsFirstInsteadOfSecond.style.opacity = 0;
if (message && showMesesages) {
// For safety, if message doesn't exist, set it to empty string anyway
if (!message)
message = '';
// If there is a message, show it in the second part of the animation
// Else, just close the alert box and run the next alert
if (message.trim().length > 0 && showMesesages) {
//theContentThatShowsLastInsteadOfFirst.style.display = 'inline-block';
theContentThatShowsLastInsteadOfFirst.style.visibility = 'visible';