mirror of
https://github.com/ArthurDanjou/artchat.git
synced 2026-01-14 13:54:01 +01:00
feat: enhance scroll behavior by ensuring messages exist before scrolling
This commit is contained in:
@@ -16,7 +16,7 @@ watch(
|
|||||||
height,
|
height,
|
||||||
async () => {
|
async () => {
|
||||||
await nextTick()
|
await nextTick()
|
||||||
if (lastLang.value === locale.value && parents.value) {
|
if (lastLang.value === locale.value && parents.value && messages.length > 0) {
|
||||||
const children = parents.value.children
|
const children = parents.value.children
|
||||||
if (children.length > 0 && children[children.length - 2]) {
|
if (children.length > 0 && children[children.length - 2]) {
|
||||||
const lastChild = children[children.length - 2] as HTMLElement
|
const lastChild = children[children.length - 2] as HTMLElement
|
||||||
|
|||||||
Reference in New Issue
Block a user