Skip to content

Commit

Permalink
Update VList.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
inokawa committed Dec 29, 2023
1 parent 23a77c1 commit fd0852a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/vue/VList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const VList = /*#__PURE__*/ defineComponent({
const isHorizontal = props.horizontal;
const rootRef = ref<HTMLDivElement>();
const store = createVirtualStore(
props.data!.length,
props.data.length,
props.initialItemSize ?? 40,
undefined,
undefined,
Expand Down Expand Up @@ -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]);
}
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit fd0852a

Please sign in to comment.