Commit 8a61d635 authored by Mathieu Giraud's avatar Mathieu Giraud

js/clone.js: .getShortName(), do not output '0' for 0-length N

Shorten 6//5 into 6//5, and not into 6/0/5.

For now, we prefer to keep 6/ACCAT/ as 6/5/0 and not 6/5/.
parent 4eb831f4
......@@ -57,6 +57,7 @@ function Clone(data, model, index, virtual) {
this.computeEValue()
}
function nullIfZero(x) { return x == 0 ? '' : x }
Clone.prototype = {
......@@ -93,7 +94,7 @@ Clone.prototype = {
z = s.match(this.REGEX_N);
if (z)
{
short_name_items.push(z[1] + '/' + z[2].length + '/' + z[3])
short_name_items.push(z[1] + '/' + nullIfZero(z[2].length) + '/' + z[3])
continue
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment