From 51a889e3a83e2218235e5df6e3fc53f817ae3ed6 Mon Sep 17 00:00:00 2001 From: rr- Date: Thu, 7 Apr 2016 22:28:17 +0200 Subject: [PATCH] client/api: protect against null error messages --- client/js/views/base_view.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/js/views/base_view.js b/client/js/views/base_view.js index 9cfc76c..bdeef9d 100644 --- a/client/js/views/base_view.js +++ b/client/js/views/base_view.js @@ -6,6 +6,9 @@ const contentHolder = document.getElementById('content-holder'); require('../util/polyfill.js'); function messageHandler(message, className) { + if (!message) { + message = 'Unknown message'; + } const messagesHolder = contentHolder.querySelector('.messages'); if (!messagesHolder) { alert(message);