fix displaying 1 / 0 in find widget

This commit is contained in:
zadam 2023-09-05 21:00:24 +02:00
parent 01474ecd2d
commit 121e4ba2ea
3 changed files with 3 additions and 3 deletions

View File

@ -115,7 +115,7 @@ export default class FindInCode {
return {
totalFound,
currentFound: currentFound + 1
currentFound: Math.min(currentFound + 1, totalFound)
};
}

View File

@ -39,7 +39,7 @@ export default class FindInHtml {
res({
totalFound: this.$results.length,
currentFound: 1
currentFound: Math.min(1, this.$results.length)
});
}
});

View File

@ -59,7 +59,7 @@ export default class FindInText {
return {
totalFound,
currentFound: currentFound + 1
currentFound: Math.min(currentFound + 1, totalFound)
};
}