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
I'm grabbing data from GraphQL and I still get an object (with ariaLabel: null, element: null, target: "", text: "[my default link text]", url: null) for a field which I've marked as "no link". I would expect not an object but null instead.
This is a problem. I want to display a link only if there is a link. But a check like this doesn't work: {% if block.myLink %}<a href="{{ block.myLink }}">{% endif %}
Whilst {{ block.myLink }} doesn't display anything, it still think it is something.
In the page entry the link has a dropdown menu with the default (No link) selected.
I'm experiencing the same issue as @only1pulcinellacasarina. I think this might be related to another bug, in which the default link type isn't being honoured.
Update @only1pulcinellacasarina Looking at the docs, block.myLink will return an empty string if it's unset. Either use block.myLink != '' or block.myLink.getLink() within your conditional. I think this is a change from previous versions, as the block.myLink used to work fine.
I'm grabbing data from GraphQL and I still get an object (with
ariaLabel: null, element: null, target: "", text: "[my default link text]", url: null
) for a field which I've marked as "no link". I would expect not an object butnull
instead.Related to #147
The text was updated successfully, but these errors were encountered: