client/api: protect against null error messages

This commit is contained in:
rr- 2016-04-07 22:28:17 +02:00
parent e0516af111
commit 51a889e3a8

View file

@ -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);