From 14373f5123a2b2df9d882939161e22c52094036c Mon Sep 17 00:00:00 2001 From: Amir Raminfar Date: Wed, 13 May 2020 15:20:53 -0700 Subject: [PATCH] Uses addEventListenr --- assets/components/LogEventSource.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/components/LogEventSource.vue b/assets/components/LogEventSource.vue index b9d2be4d..d6900ffc 100644 --- a/assets/components/LogEventSource.vue +++ b/assets/components/LogEventSource.vue @@ -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() {