Issue
I have two projects, and in one, this code yields no error:
form: FormGroup = new FormGroup({
s: new FormControl('')
})
fo$ = this.form.get('s').valueChanges.pipe(
map(a => console.log('something'))
);
But in my new project, this brings up the error "Object is possibly 'null'." How can I solve this?
Solution
Problem
It's probably the case where you have strict mode enabled in one project, and disabled in other project.
Solution
Go to the tsconfig.json file and disable strict mode in the project where it's enabled.
Answered By - NeNaD
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.