diff --git a/frontend-js/src/main/js/GuiConnector.js b/frontend-js/src/main/js/GuiConnector.js
index 1843dea7e7dfde14fe4b8f4b208cd22f9ff2ad34..de2590046dd8153d259299a1c1d9c9d3818707f4 100644
--- a/frontend-js/src/main/js/GuiConnector.js
+++ b/frontend-js/src/main/js/GuiConnector.js
@@ -334,6 +334,7 @@ GuiConnector.prototype.gatherReportData = function () {
  * @param {boolean} [redirectIfSecurityError]
  */
 GuiConnector.prototype.alert = function (error, redirectIfSecurityError) {
+  error = error || '';
   if (redirectIfSecurityError && error instanceof SecurityError && ServerConnector.getSessionData().getLogin() === "anonymous") {
     window.location.href = ServerConnector.getServerBaseUrl() + "login.xhtml?from=" + encodeURI(window.location.href);
   } else {