From 1c6f421eee77e490b26734a67bdcdf6081cbc4e4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timoth=C3=A9e=20Poussard?= <tpoussard@neogeo.fr>
Date: Mon, 11 Oct 2021 15:15:56 +0200
Subject: [PATCH] fix regression from id revert on e3e37620 to scroll on
 messages

---
 src/store/index.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/store/index.js b/src/store/index.js
index eef57b2b..ebd768b6 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -101,7 +101,7 @@ export default new Vuex.Store({
     },
     DISPLAY_MESSAGE(state, comment) {
       state.messages = [{ comment }, ...state.messages];
-      document.getElementById("messages").scrollIntoView({ block: "start", inline: "nearest" });
+      if (document.getElementById("content")) document.getElementById("content").scrollIntoView({ block: "start", inline: "nearest" });
       setTimeout(() => {
         state.messages = [];
       }, 3000);
-- 
GitLab