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
{{#each things as |thing|}}
{{d3-graph
(pipe
(d3-text (moment-format thing.dateTime 'H:mm'))
(d3-attr 'class'
(if
(is-after now thing.dateTime)
'late'
'not-late'
)
)
)
tagName='text'}}
{{/each}}
The inconsistent
The is-after helper logs the an empty value (null, undefined, or "") was passed to moment-format warning while the moment-format helper renders without any warning. Everything works as expected; the time is rendered with the late class (if now is after dateTime)... but with an ugly console warning :-(.
The odd
In the same conditions, if I set allow-empty=true on the is-after helper, the text is rendered with the not-late class (instead of late).
I have something like this in a template:
The inconsistent
The is-after helper logs the
an empty value (null, undefined, or "") was passed to moment-format
warning while the moment-format helper renders without any warning. Everything works as expected; the time is rendered with the late class (if now is after dateTime)... but with an ugly console warning :-(.The odd
In the same conditions, if I set
allow-empty=true
on the is-after helper, the text is rendered with the not-late class (instead of late).It seems like the comparison helper fails with
allow-empty=true
and looking at https://github.com/stefanpenner/ember-moment/blob/master/addon/utils/helper-compute.js I don't really understand whyallowEmpty
is taken into account in a comparison helper.Tested with v7.3.1 on ember v2.14.1 & v2.13.4
The text was updated successfully, but these errors were encountered: