Skip to content

Undefined error even though passing valid array #5

@ben1499

Description

@ben1499

I'm getting the error: [Vue warn]: Error in setup: "TypeError: Cannot read properties of undefined (reading 'length')". But the options array I'm passing is valid and i haven't read the length property anywhere.

It was working initially, but after i generated new js bundle it stopped working. I'm on Vue 2.7.16
I have also installed the @vue/composition-api package during initial setup.

This is the import I'm using
import VList from '@virtual-list/vue/vue2'

Code:

 <VList
    ref="list"
    :items="options"
    :first-render="10"
    item-key="index"
    class="scroller"
  >
</Vlist>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions