When I save the file vscode auto scrolls to this random line and points to the . giving this error. I just check if dateToComplete
is null
because sometimes it needs to be, do I need to disable some new feature from ts?
if (this.editMode || !this.dateToComplete?.pristine)
Here is full Output tab warning or whatever is it.
Expression expected. (90:46)
88 | selectDate(d: any) {
89 | if (d) {
> 90 | if (this.editMode || !this.dateToComplete?.pristine)
| ^
91 | this.selectedDate = moment(d, 'YYYY-MM-DD').toDate();
92 | }
93 | }
Any help appreciated, if is a duplicate question I just didn't find it but you can point me out.