Settings, "Show cards count" now shows also 1 card

This commit is contained in:
Martin Filser 2021-02-06 15:44:18 +01:00
parent 40907ef1d8
commit 8475201db8
3 changed files with 5 additions and 5 deletions

View file

@ -274,7 +274,7 @@ Template.changeSettingsPopup.events({
'keypress/paste #show-cards-count-at'() {
let keyCode = event.keyCode;
let charCode = String.fromCharCode(keyCode);
let regex = new RegExp("[0-9]");
let regex = new RegExp("[-0-9]");
let ret = regex.test(charCode);
return ret;
},
@ -309,8 +309,8 @@ Template.changeSettingsPopup.events({
10,
);
const currentUser = Meteor.user();
if (isNaN(minLimit)) {
minLimit = 0;
if (isNaN(minLimit) || minLimit < -1) {
minLimit = -1;
}
if (!isNaN(minLimit)) {
if (currentUser) {