diff --git a/rhodecode/templates/files/files.mako b/rhodecode/templates/files/files.mako
--- a/rhodecode/templates/files/files.mako
+++ b/rhodecode/templates/files/files.mako
@@ -206,7 +206,9 @@
tmpl = tmpl.concat(escapeHtml(commit_ref.text));
}
var idx = commit_ref.idx || 0;
- tmpl = tmpl.concat('r{0}'.format(idx));
+ if (idx !== 0) {
+ tmpl = tmpl.concat('r{0}'.format(idx));
+ }
return tmpl
};
@@ -397,7 +399,9 @@
}
var idx = commit_ref.idx || 0;
- tmpl = tmpl.concat('r{0}'.format(idx));
+ if (idx !== 0) {
+ tmpl = tmpl.concat('r{0}'.format(idx));
+ }
return tmpl
};