[Vuejs]-Vue.js 1.0.15 filtering lists cannot read property of undefined

4👍

You should instantiate products as an empty array to start. In your Vue component:

data:function(){
    return {
        products:[]
    }
}

This way it doesn’t try to run the limitBy filter on an undefined variable while it’s waiting for that ajax request.

👤Jeff

Leave a comment