We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f817aa7 commit 9454276Copy full SHA for 9454276
1 file changed
script.js
@@ -557,7 +557,7 @@ function exportLapTimes() {
557
558
function updateStats() {
559
const text = input.value.trim();
560
- const words = text ? text.match(/\b\w+\b/g) ? text.length || 0 : 0;
+ const words = text ? (text.match(/\b\w+\b/g) || []).length : 0;
561
const chars = text.length;
562
563
const wordsPerMinute = 200;
0 commit comments