Closed FredUK closed 7 years ago
I recommend creating a helper to unwrap your SafeString, or create a t-helper that returns just a string.. Otherwise, I'd need to support unwrapping all attributes and params because of ember-i18n.
In ember-intl I handle this differently by only returning a SafeString
for {{format-html}}
, the normal t
helper returns a string since it never returns markup.
I'm trying to use a string from ember-i18n as my outputFormat on moment-format but it does not like it and moment throws an error a.match is not a function.
According to ember-i18n:
Apparently moment-format does not support a SafeString as it just tries to pass that object into moment to render it. I think a simple check to see if the property is an instance of EmberSafeString would suffice.
ember.moment@4.2.1