fix(sticky): fix error in transition & sticky (#5483)

This commit is contained in:
johnsonwong666 2023-07-17 09:54:00 +08:00 committed by GitHub
parent 8021e7cdfd
commit 9ead748d91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,7 +89,7 @@ VantComponent({
}
getRect(this, ROOT_ELEMENT).then((root) => {
if (!isDef(root)) {
if (!isDef(root) || (!root.width && !root.height)) {
return;
}
if (offsetTop >= root.top) {