Only handle if ref exists
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user