diff --git a/assets/web/templates/index.html.tmpl b/assets/web/templates/index.html.tmpl
index 0b10c99..70761bb 100644
--- a/assets/web/templates/index.html.tmpl
+++ b/assets/web/templates/index.html.tmpl
@@ -22,7 +22,9 @@
var source = new EventSource("/log");
source.onmessage = function(event) {
var j = JSON.parse(event.data);
- document.getElementById("log").innerHTML += j.message + "
";
+ if (j.hasOwnProperty('message')) {
+ document.getElementById("log").innerHTML += j.message + "
";
+ }
};
} else {
document.getElementById("log").innerHTML = "Sorry, your browser does not support server-sent events...";