Fix addMessage always adding to last buffer

This commit is contained in:
Simon Ser 2020-04-25 10:32:29 +02:00
parent 4c032c03a7
commit 55e1107e38
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48

View file

@ -87,7 +87,7 @@ function createBuffer(name) {
var li = document.createElement("li");
li.appendChild(a);
buf = {
var buf = {
name: name,
li: li,
messages: [],
@ -96,7 +96,7 @@ function createBuffer(name) {
addMessage: function(msg) {
buf.messages.push(msg);
if (activeBuffer == buf) {
if (activeBuffer === buf) {
logElt.appendChild(createMessageElement(msg));
}
},