Skip to content

Commit

Permalink
use ifelse helper in nav-tree
Browse files Browse the repository at this point in the history
  • Loading branch information
mojavelinux committed Sep 7, 2018
1 parent fbf99ef commit f1c3653
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/partials/nav-tree.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
<button class="nav-toggle"></button>
{{/if}}
{{#if ./url}}
<a class="nav-link" href="
{{~#if (eq ./urlType 'internal')}}{{{relativize ./url}}}
{{~else}}{{{./url}}}{{~/if}}">{{{./content}}}</a>
<a class="nav-link" href="{{{ifelse (eq ./urlType 'internal') (relativize ./url) ./url}}}">{{{./content}}}</a>
{{else}}
<span class="nav-text">{{{./content}}}</span>
{{/if}}
Expand Down

0 comments on commit f1c3653

Please sign in to comment.