Return early if field is empty
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3563269. --> Reported by: [smustgrave](https://www.drupal.org/user/3252890) Related to !23 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>When the field is empty it's still rendering the template</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>Add a mermaid field to any content type<br> Create a node but don't fill in the field<br> Actually see that it's trying to render, because $element is not empty</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Return early if empty</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <p>Review</p> <h3 id="summary-ui-changes">User interface changes</h3> <p>NA</p> <h3 id="summary-api-changes">API changes</h3> <p>NA</p> <h3 id="summary-data-model-changes">Data model changes</h3> <p>NA</p>
issue