1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-21 21:33:18 +01:00

Uses addEventListenr

This commit is contained in:
Amir Raminfar
2020-05-13 15:20:53 -07:00
parent 5154002cb2
commit 14373f5123

View File

@@ -48,10 +48,10 @@ export default {
this.messages.push(...this.buffer);
this.buffer = [];
};
this.es.onmessage = (e) => {
this.es.addEventListener("message", (e) => {
this.buffer.push(this.parseMessage(e.data));
flushBuffer();
};
});
this.$once("hook:beforeDestroy", () => this.es.close());
},
async loadOlderLogs() {