From 343b7e333f4bce7fdb37fe05ec159370ac6447cd Mon Sep 17 00:00:00 2001 From: Herrington Darkholme <2883231+HerringtonDarkholme@users.noreply.github.com> Date: Sun, 26 Dec 2021 02:44:47 -0500 Subject: [PATCH] fix(components): always emit scroll with scrollTop number (#4974) --- packages/components/affix/src/affix.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/affix/src/affix.vue b/packages/components/affix/src/affix.vue index 39ecc11a21..44cd9fcbce 100644 --- a/packages/components/affix/src/affix.vue +++ b/packages/components/affix/src/affix.vue @@ -75,7 +75,7 @@ export default defineComponent({ state.scrollTop = scrollContainer.value instanceof Window ? document.documentElement.scrollTop - : scrollContainer.value.scrollTop + : scrollContainer.value.scrollTop || 0 state.clientHeight = document.documentElement.clientHeight if (props.position === 'top') {