round reading progress to 100% if more than that

round reading progress to 100% if more than that

round reading progress to 100% if more than that
This commit is contained in:
Hongbo Wu 2022-03-18 14:50:08 +08:00
parent 17edc482f6
commit 4c535147f1

View file

@ -66,7 +66,8 @@ export function Article(props: ArticleProps): JSX.Element {
if (!readingProgress) return
await articleReadingProgressMutation({
id: props.articleId,
readingProgressPercent: readingProgress,
// round reading progress to 100% if more than that
readingProgressPercent: readingProgress > 100 ? 100 : readingProgress,
readingProgressAnchorIndex: readingAnchorIndex,
})
})()