miguelcobain/ember-leaflet

Not compatible with apps that use a strict `or` helper

runspired opened this issue ยท 2 comments

Had a fun debugging session tonight ๐Ÿ˜ญ

My app defines an or helper that does not come from ember-truth-helpers. This or helper is strict vs loose (meaning that it casts the return value to a boolean rather than returning a falsey or truthy value).

Turns out that the component assignment is depending on the loose or

{{#each this.componentsToYield as |c|}}
      {{ember-leaflet-assign-to
        components
        key=(or c.as c.name)
        value=(component c.name parent=this node=Node)
        onChange=this.mergeComponents}}
    {{/each}}

I see. Perhaps we should include our own "loose" or helper.

This fix was released on 5.0.0-beta.4.