Subscribe on changes!

index.html?_ijt=gkq13ujo2pf0ohmhluqubu1vct:92 Uncaught (in promise) TypeError: Cannot read property 'name' of undefined

avatar
Sep 14th 2020

Version

3.0.0-rc.10

Reproduction link

https://jsfiddle.net/jw38fg6s/

Steps to reproduce

remove items. when you remove the last row it happens

What is expected?

it is expected not to loop if the array.length is 0

What is actually happening?

it loops through and tries to access the property of non-existent element

avatar
Sep 14th 2020

The error comes from your computed:

comp() {
                return `${this.rows[0].name} ${this.rows[0].job} `;
            }

this.rows[0] is undefined


Hi, thanks for your interest but Github issues are for bug reports and feature requests only. You can ask questions on the forum, the Discord server or StackOverflow.