clients/general: fix empty view message handling

This commit is contained in:
rr- 2016-05-12 00:13:01 +02:00
parent 414f841944
commit d123f27815
1 changed files with 5 additions and 2 deletions

View File

@ -4,12 +4,15 @@ const views = require('../util/views.js');
class EmptyView { class EmptyView {
constructor() { constructor() {
this.template = views.htmlToDom('<div class="messages"></div>'); this.template = () => {
return views.htmlToDom(
'<div class="wrapper"><div class="messages"></div></div>');
};
} }
render(ctx) { render(ctx) {
const target = document.getElementById('content-holder'); const target = document.getElementById('content-holder');
const source = this.template; const source = this.template();
views.listenToMessages(source); views.listenToMessages(source);
views.showView(target, source); views.showView(target, source);
} }