fix: add component attr in post tools only if action is defined

main
Julian Lam 4 years ago
parent 949a137e7e
commit 6c5d456bf5

@ -57,7 +57,7 @@
{{{each posts.tools}}} {{{each posts.tools}}}
<li {{{ if ./disabled }}}class="disabled" {{{ end }}}> <li {{{ if ./disabled }}}class="disabled" {{{ end }}}>
<a component="{posts.tools.action}" role="menuitem" tabindex="-1" href="#"> <a {{{ if ./action}}}component="{./action}"{{{ end }}} role="menuitem" tabindex="-1" href="{{{ if ./href }}}{./href}{{{ else }}}#{{{ end }}}">
<span class="menu-icon"><i class="fa fa-fw {posts.tools.icon}"></i></span> {{posts.tools.html}} <span class="menu-icon"><i class="fa fa-fw {posts.tools.icon}"></i></span> {{posts.tools.html}}
</a> </a>
</li> </li>

Loading…
Cancel
Save