Skip to content

Commit 75b080c

Browse files
committed
use built-in if-else to avoid unnecessary calls relativize
1 parent ac6d72a commit 75b080c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/partials/nav-tree.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<button class="nav-toggle"></button>
1111
{{/if}}
1212
{{#if ./url}}
13-
<a class="nav-link" href="{{ifelse (eq ./urlType 'internal') (relativize ./url) ./url}}">{{{./content}}}</a>
13+
<a class="nav-link" href="{{#if (eq ./urlType 'internal')}}{{relativize ./url}}{{else}}{{url}}{{/if}}">{{{./content}}}</a>
1414
{{else}}
1515
<span class="nav-text">{{{./content}}}</span>
1616
{{/if}}

0 commit comments

Comments
 (0)