files: don't format 0 revision in select pickers

This commit is contained in:
Marcin Kuzminski 2019-05-29 20:22:44 +02:00
parent 9a47088b4a
commit ba926f35d4

View file

@ -206,7 +206,9 @@
tmpl = tmpl.concat(escapeHtml(commit_ref.text));
}
var idx = commit_ref.idx || 0;
tmpl = tmpl.concat('<span class="select-index-number">r{0}</span>'.format(idx));
if (idx !== 0) {
tmpl = tmpl.concat('<span class="select-index-number">r{0}</span>'.format(idx));
}
return tmpl
};
@ -397,7 +399,9 @@
}
var idx = commit_ref.idx || 0;
tmpl = tmpl.concat('<span class="select-index-number">r{0}</span>'.format(idx));
if (idx !== 0) {
tmpl = tmpl.concat('<span class="select-index-number">r{0}</span>'.format(idx));
}
return tmpl
};