- if (tcParts.length >= 2)
- {
- const increment = tcParts[1].match(/([0-9]+)([smhd])/);
- if (!increment)
- return null;
- const incrementValue = parseInt(increment[1]);
- const incrementUnit = increment[2];
+ if (tcParts.length >= 2) {
+ // Correspondance games don't use an increment:
+ if (mainTimeUnit == 'd') return null;
+ tcParts[1] += "s";
+ const incrementArray = tcParts[1].match(/^([0-9]+)([smhd]+)$/);
+ if (!incrementArray) return null;
+ const incrementValue = parseInt(incrementArray[1]);
+ const incrementUnit = incrementArray[2][0];