client/api: protect against null error messages
This commit is contained in:
parent
e0516af111
commit
51a889e3a8
1 changed files with 3 additions and 0 deletions
|
@ -6,6 +6,9 @@ const contentHolder = document.getElementById('content-holder');
|
||||||
require('../util/polyfill.js');
|
require('../util/polyfill.js');
|
||||||
|
|
||||||
function messageHandler(message, className) {
|
function messageHandler(message, className) {
|
||||||
|
if (!message) {
|
||||||
|
message = 'Unknown message';
|
||||||
|
}
|
||||||
const messagesHolder = contentHolder.querySelector('.messages');
|
const messagesHolder = contentHolder.querySelector('.messages');
|
||||||
if (!messagesHolder) {
|
if (!messagesHolder) {
|
||||||
alert(message);
|
alert(message);
|
||||||
|
|
Loading…
Reference in a new issue