diff --git a/src/ui/Attendees.vue b/src/ui/Attendees.vue index 059f4b1..ccc2b43 100644 --- a/src/ui/Attendees.vue +++ b/src/ui/Attendees.vue @@ -24,9 +24,11 @@ export default { attendees: { deep: true, handler() { - setTimeout(() => { - this.$refs.attendees.scrollTop = this.$refs.attendees.scrollHeight; - }, 50); + if (this.$refs && this.$refs.history) { + setTimeout(() => { + this.$refs.attendees.scrollTop = this.$refs.attendees.scrollHeight; + }, 50); + } } } } diff --git a/src/ui/Chat.vue b/src/ui/Chat.vue index d104290..e66ee08 100644 --- a/src/ui/Chat.vue +++ b/src/ui/Chat.vue @@ -53,9 +53,11 @@ export default { watch: { chatHistory: { handler() { - setTimeout(() => { - this.$refs.history.scrollTop = this.$refs.history.scrollHeight; - }, 10); + if (this.$refs && this.$refs.history) { + setTimeout(() => { + this.$refs.history.scrollTop = this.$refs.history.scrollHeight; + }, 10); + } }, deep: true }