From fd0852a187f2e94eb21acdd11477f4b3ded08cde Mon Sep 17 00:00:00 2001 From: inokawa <48897392+inokawa@users.noreply.github.com> Date: Fri, 29 Dec 2023 18:56:03 +0900 Subject: [PATCH] Update VList.tsx --- src/vue/VList.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vue/VList.tsx b/src/vue/VList.tsx index 140704cc4..96b52943f 100644 --- a/src/vue/VList.tsx +++ b/src/vue/VList.tsx @@ -93,7 +93,7 @@ export const VList = /*#__PURE__*/ defineComponent({ const isHorizontal = props.horizontal; const rootRef = ref(); const store = createVirtualStore( - props.data!.length, + props.data.length, props.initialItemSize ?? 40, undefined, undefined, @@ -137,7 +137,7 @@ export const VList = /*#__PURE__*/ defineComponent({ }); watch( - () => props.data!.length, + () => props.data.length, (count) => { store._update(ACTION_ITEMS_LENGTH_CHANGE, [count, props.shift]); } @@ -184,7 +184,7 @@ export const VList = /*#__PURE__*/ defineComponent({ return () => { rerender.value; - const count = props.data!.length; + const count = props.data.length; const [startIndex, endIndex] = store._getRange(); const scrollDirection = store._getScrollDirection();