From ac4f32cd3105a9b7b04437923038ad51abb304c6 Mon Sep 17 00:00:00 2001
From: Mart van Santen <mart@greenhost.nl>
Date: Thu, 30 Mar 2023 17:49:20 +0800
Subject: [PATCH] Cleanup code

---
 backend/web/static/base.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/backend/web/static/base.js b/backend/web/static/base.js
index 8b8ef304..79b71d3a 100644
--- a/backend/web/static/base.js
+++ b/backend/web/static/base.js
@@ -298,11 +298,11 @@ function render_messages(data) {
     return '';
   }
 
+  // Not show again if already shown. User probably just reloaded the screen
   if (Cookies.get('last_flow_id_rendered_message') == data.id) {
-    console.log("We already shown this message. User manually reloaded page.");
     return;
   }
-  console.log("Running message render, and gues what, i have messages");
+
   var html = '';
   messages.forEach((message) => {
     html += message.text;
@@ -318,8 +318,9 @@ function render_messages(data) {
     $('#contentMessages').addClass('alert-warning');
   }
 
+  // Store we shown these messages
   Cookies.set('last_flow_id_rendered_message', data.id);
- 
+
   return html;
 }
 
-- 
GitLab