Incorrect {{has-block}} during interop
chancancode opened this issue · 3 comments
As explained in the README:
On Ember versions without native named blocks support, when passing only named blocks (without passing a
<:default>
or<:main>
block) to an external (addon) component whose template was not preprocessed by this polyfill,{{has-block}}
in that component's template will returntrue
.This is unlikely to be an issue in practice – if you are running an Ember version that requires this polyfill and the addon itself is not also using the polyfill, it probably means that the addon component you are invoking does not accept named blocks anyway, so there is no use in passing them.
This is due to desugaring the named blocks into the default/main block. There is probably no way to fix this, but seems unlikely to be a real issue.
I've hit this issue when using this addon in a 3.15 app with several in-repo addons.
The dependency graph is as follow
ui-addon -> middle-addon -> ember-app
ui-addon
is providing a component that accepts named blocks. In order to be able to use this component in both middle-addon
and ember-app
, I've had to add ember-named-blocks-polyfill
as a dependency in all packages.
Not a very big deal, but I though it was worth mentioning here
Indeed @chancancode, #24 is more likely to be the source of my issue 👍