mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix message timer showing NaN in some cases
This commit is contained in:
@ -1928,6 +1928,10 @@ function formatGenerationTimer(gen_started, gen_finished, tokenCount) {
|
|||||||
tokenCount > 0 ? `Token rate: ${Number(tokenCount / seconds).toFixed(1)} t/s` : '',
|
tokenCount > 0 ? `Token rate: ${Number(tokenCount / seconds).toFixed(1)} t/s` : '',
|
||||||
].join('\n');
|
].join('\n');
|
||||||
|
|
||||||
|
if (isNaN(seconds)) {
|
||||||
|
return { timerValue: '', timerTitle };
|
||||||
|
}
|
||||||
|
|
||||||
return { timerValue, timerTitle };
|
return { timerValue, timerTitle };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user