From 49d65848837134f3f69e2752090507b9adf6465c Mon Sep 17 00:00:00 2001
From: sherzinger <sascha.herzinger@uni.lu>
Date: Fri, 25 Jan 2019 11:17:32 +0100
Subject: [PATCH] fixing issue where alert dialog would break if error was
 undefined

---
 frontend-js/src/main/js/GuiConnector.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/frontend-js/src/main/js/GuiConnector.js b/frontend-js/src/main/js/GuiConnector.js
index 1843dea7e7..de2590046d 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 {
-- 
GitLab