Current behavior
Pipe crashes when value is missing
ERROR SyntaxError: Wrong parameter in TimeagoPipe. Expected a valid date, received: null
This will happen while you wait for content to load
{{ item?.createdAt | timeago }}
This will most likely happen during testing, when you don't mock whole object.
Expected behavior
Display nothing
How do you think that we should fix this?
Add null check
Minimal reproduction of the problem with instructions
{{ '' | timeago}}
{{ undefined | timeago}}
{{ null | timeago}}
Environment
ngx-timeago version: ^1.0.4
Angular version: 10.0.12