You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try that I receive the error type 'Null' is not a subtype of type 'Function'
I'm wondering if this is possible and I'm just writing it incorrectly or if support for ? can be added. If you see a way for it to be added I'm happy to contribute if you can provide me some guidance on how to implement this feature.
I see that this can be worked around by using ${record.date != null ? record.date.toDate().format('date_short') : ''} but I'm looking for a more succinct way to write this since null values are common in our system. I can also envision having member functions that could return null such as toDate returning null because the date does not match a supported format.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I have added some Date operators as MemberAccessors that are the following:
I can then use an expression like the following:
record.myStringifiedDate.toDate().format('date_short')
However, when the
myStringifiedDate
field is null it throws an exception. I've attempted to use an expression likerecord.myStringifiedDate?.toDate().format('date_short') ?? ''
When I try that I receive the error
type 'Null' is not a subtype of type 'Function'
I'm wondering if this is possible and I'm just writing it incorrectly or if support for
?
can be added. If you see a way for it to be added I'm happy to contribute if you can provide me some guidance on how to implement this feature.I see that this can be worked around by using
${record.date != null ? record.date.toDate().format('date_short') : ''}
but I'm looking for a more succinct way to write this since null values are common in our system. I can also envision having member functions that could return null such astoDate
returning null because the date does not match a supported format.The text was updated successfully, but these errors were encountered: