mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
fix not setting zero
This commit is contained in:
parent
451ed1c70e
commit
45b2fa6329
1 changed files with 7 additions and 6 deletions
|
|
@ -792,13 +792,14 @@ export const saveArticleReadingProgressResolver = authorized<
|
|||
// If we have a top percent, we only save it if it's greater than the current top percent
|
||||
// or set to zero if the top percent is zero.
|
||||
const readingProgressTopPercentToSave = readingProgressTopPercent
|
||||
? readingProgressTopPercent === 0
|
||||
? 0
|
||||
: Math.max(
|
||||
readingProgressTopPercent,
|
||||
page.readingProgressTopPercent || 0
|
||||
)
|
||||
? Math.max(readingProgressTopPercent, page.readingProgressTopPercent || 0)
|
||||
: readingProgressTopPercent === 0
|
||||
? 0
|
||||
: undefined
|
||||
console.log(
|
||||
'readingProgressTopPercentToSave',
|
||||
readingProgressTopPercentToSave
|
||||
)
|
||||
// If setting to zero we accept the update, otherwise we require it
|
||||
// be greater than the current reading progress.
|
||||
const updatedPart = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue