Only handle if ref exists
This commit is contained in:
@@ -24,9 +24,11 @@ export default {
|
|||||||
attendees: {
|
attendees: {
|
||||||
deep: true,
|
deep: true,
|
||||||
handler() {
|
handler() {
|
||||||
setTimeout(() => {
|
if (this.$refs && this.$refs.history) {
|
||||||
this.$refs.attendees.scrollTop = this.$refs.attendees.scrollHeight;
|
setTimeout(() => {
|
||||||
}, 50);
|
this.$refs.attendees.scrollTop = this.$refs.attendees.scrollHeight;
|
||||||
|
}, 50);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,9 +53,11 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
chatHistory: {
|
chatHistory: {
|
||||||
handler() {
|
handler() {
|
||||||
setTimeout(() => {
|
if (this.$refs && this.$refs.history) {
|
||||||
this.$refs.history.scrollTop = this.$refs.history.scrollHeight;
|
setTimeout(() => {
|
||||||
}, 10);
|
this.$refs.history.scrollTop = this.$refs.history.scrollHeight;
|
||||||
|
}, 10);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user