fixed tags always showing as pb

This commit is contained in:
Miodec 2023-02-28 12:51:42 +01:00
parent e2ef89bc7e
commit 2637094c5c

View file

@ -460,7 +460,11 @@ function updateTags(dontSave: boolean): void {
$("#result .stats .tags .bottom").append(`
<div tagid="${tag._id}" aria-label="PB: ${tpb}" data-balloon-pos="up">${tag.display}<i class="fas fa-crown hidden"></i></div>
`);
if (Config.mode != "quote" && !dontSave) {
if (
Config.mode != "quote" &&
!dontSave &&
(await Misc.getFunbox(result.funbox ?? ""))?.canGetPb === true
) {
if (tpb < result.wpm) {
//new pb for that tag
DB.saveLocalTagPB(