aboutsummaryrefslogtreecommitdiffstats
path: root/modules/templates/util_misc.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/templates/util_misc.go')
-rw-r--r--modules/templates/util_misc.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/templates/util_misc.go b/modules/templates/util_misc.go
index 2d42bc76b5..cc5bf67b42 100644
--- a/modules/templates/util_misc.go
+++ b/modules/templates/util_misc.go
@@ -38,10 +38,11 @@ func sortArrow(normSort, revSort, urlSort string, isDefault bool) template.HTML
} else {
// if sort arg is in url test if it correlates with column header sort arguments
// the direction of the arrow should indicate the "current sort order", up means ASC(normal), down means DESC(rev)
- if urlSort == normSort {
+ switch urlSort {
+ case normSort:
// the table is sorted with this header normal
return svg.RenderHTML("octicon-triangle-up", 16)
- } else if urlSort == revSort {
+ case revSort:
// the table is sorted with this header reverse
return svg.RenderHTML("octicon-triangle-down", 16)
}