I have a simple case of pushing unique values into array. It looks like this:
this.items = []; add(item) { if(this.items.indexOf(item) > -1) {
Yep, it's a small mistake.
if(this.items.indexOf(item) === -1) { this.items.push(item); console.log(this.items); }