'{0}' label is not shown anymore

Previously, '{0}' would be labelled as '-1 Times', which is not actually the case.
Also I am not sure to best visualize such a pattern, right now, except for the label,
'a{0}' looks similar to 'a?', even though they don't have the same effect.
This commit is contained in:
Sebastian Thiel authored and Jeff Avallone committed 2016-07-27 11:12:56 -04:00
1 parent a624c00554
commit 388c625e47
2 files changed
+15

No files matched your search

+3
View File
@@ -33,6 +33,9 @@ export default {
label: {
get: function() {
if (this.minimum === this.maximum) {
if (this.minimum === 0) {
return undefined;
}
return formatTimes(this.minimum - 1);
} else if (this.minimum <= 1 && this.maximum >= 2) {
return `at most ${formatTimes(this.maximum - 1)}`;