javascript - Cannot delete property '1' of [object Array] - Stack Overflow


I've faced the same issue and according to this article the problem is that user array has non configurable properties. I suppose angular Inputs are set as non configurable. When you do: this.users = this.usersInput you simply pass the reference of input to this.users. The solution is to simply copy input array before splicing. In your case:

    this.users = [...this.usersInput];

Btw. do it in deleteUser method instead of afterViewInit with local variable. You do not need two class props referring to the same object.

Không có nhận xét nào:

URL parameters with React Router

 https://ui.dev/react-router-url-parameters If you're reading this, you're probably familiar with the idea of function parameters. T...