How to fix this
Not all code paths return a value
Have a look at the code
file path: src/app/app.component.ts
handleClick(itemNumber: number) {
if (this.winMessage) {
return this.toastr.success(this.winMessage);
}
if (this.itemArray[itemNumber] === 'empty') {
this.itemArray[itemNumber] = this.isCross ? 'cross' : 'circle';
this.isCross = !this.isCross;
} else {
return this.toastr.info('Already filled');
}
this.checkIsWinner();
}