From: test test Date: Mon, 14 Jun 2021 12:51:47 +0000 (+0200) Subject: Fix chat loaded when not present in page X-Git-Tag: 2.1~66^2^2~30 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=d099366c7fa3cd95429ef7e7466c667621d2f3f0;p=teleforma.git Fix chat loaded when not present in page --- diff --git a/teleforma/src/js/main.ts b/teleforma/src/js/main.ts index 9d2c0031..463805a7 100644 --- a/teleforma/src/js/main.ts +++ b/teleforma/src/js/main.ts @@ -3,6 +3,8 @@ import Chat from "./components/Chat.vue" Vue.config.productionTip = false -new Vue({ - render: (h) => h(Chat) -}).$mount("#chat") +if(document.getElementById("chat")){ + new Vue({ + render: (h) => h(Chat) + }).$mount("#chat") +}