diff --git a/backend/web/static/base.js b/backend/web/static/base.js index 8b8ef3046d96981e9fc82bef0c2a369465705976..79b71d3abbe1d988fe601b82e687a65406d08766 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; }