From 957dc4da9ae802bfeedafda6ee409510d5f853b5 Mon Sep 17 00:00:00 2001 From: dragongoose Date: Sat, 29 Jul 2023 20:49:42 -0400 Subject: [PATCH] #19 fix chat not disconnecting --- src/components/TwitchChat.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/TwitchChat.vue b/src/components/TwitchChat.vue index 98cb676..f0eb8b4 100644 --- a/src/components/TwitchChat.vue +++ b/src/components/TwitchChat.vue @@ -9,7 +9,6 @@ import { getEndpoint } from '@/mixins' import type { Badge, ParsedMessage } from '@/assets/types' import type { VodComment } from '@/types' - export default { props: { isVod: { @@ -60,6 +59,10 @@ export default { } } }, + beforeUnmount() { + this.ws?.close() + this.ws = null + }, methods: { getChat() { return this.messages