From c23228f1967547e7df1462efa7b3bcc1a9a96319 Mon Sep 17 00:00:00 2001 From: taehoon Date: Wed, 19 Jun 2019 23:12:25 -0400 Subject: [PATCH] fix error breaking logout flow --- src/modules/chat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/chat.js b/src/modules/chat.js index 2804e577..4d8d6699 100644 --- a/src/modules/chat.js +++ b/src/modules/chat.js @@ -21,7 +21,7 @@ const chat = { }, actions: { disconnectFromChat (store) { - store.state.socket.disconnect() + store.state.socket && store.state.socket.disconnect() }, initializeChat (store, socket) { const channel = socket.channel('chat:public')