diff --git a/binaries/data/mods/public/gui/session/messages.js b/binaries/data/mods/public/gui/session/messages.js index 18d00df385..163463902f 100644 --- a/binaries/data/mods/public/gui/session/messages.js +++ b/binaries/data/mods/public/gui/session/messages.js @@ -33,6 +33,9 @@ function handleNotifications() if (!notification) return; + + if (notification.type === undefined) + notification.type = "text"; // Handle chat notifications specially if (notification.type == "chat") @@ -107,7 +110,7 @@ function handleNotifications() } } } - else + else if (notification.type == "text") { // Only display notifications directed to this player if (notification.player == Engine.GetPlayerID()) @@ -121,6 +124,10 @@ function handleNotifications() displayNotifications(); } } + else + { + warn("notification of unknown type!"); + } } function removeOldNotifications() diff --git a/binaries/data/mods/public/simulation/components/GuiInterface.js b/binaries/data/mods/public/simulation/components/GuiInterface.js index c369061a0c..7db1bafa6e 100644 --- a/binaries/data/mods/public/simulation/components/GuiInterface.js +++ b/binaries/data/mods/public/simulation/components/GuiInterface.js @@ -807,7 +807,7 @@ GuiInterface.prototype.GetNextNotification = function() if (this.notifications.length) return this.notifications.pop(); else - return ""; + return false; }; GuiInterface.prototype.GetAvailableFormations = function(player, data)