Skip to content

Commit 9454276

Browse files
authored
Update script.js
1 parent f817aa7 commit 9454276

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ function exportLapTimes() {
557557

558558
function updateStats() {
559559
const text = input.value.trim();
560-
const words = text ? text.match(/\b\w+\b/g) ? text.length || 0 : 0;
560+
const words = text ? (text.match(/\b\w+\b/g) || []).length : 0;
561561
const chars = text.length;
562562

563563
const wordsPerMinute = 200;

0 commit comments

Comments
 (0)