mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #1593 from omnivore-app/fix/set-labels-for-highlights-conflicts
Not raise error when there is conflict of setting labels in highlights
This commit is contained in:
commit
ce3d71c1ee
1 changed files with 8 additions and 10 deletions
|
|
@ -296,16 +296,14 @@ export const setLabelsForHighlight = async (
|
|||
conflicts: 'proceed', // ignore conflicts
|
||||
})
|
||||
|
||||
if (!body.updated) {
|
||||
return false
|
||||
}
|
||||
|
||||
for (const label of labels) {
|
||||
await ctx.pubsub.entityCreated<Label & { highlightId: string }>(
|
||||
EntityType.LABEL,
|
||||
{ highlightId, ...label },
|
||||
ctx.uid
|
||||
)
|
||||
if (body.updated > 0) {
|
||||
for (const label of labels) {
|
||||
await ctx.pubsub.entityCreated<Label & { highlightId: string }>(
|
||||
EntityType.LABEL,
|
||||
{ highlightId, ...label },
|
||||
ctx.uid
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
|
|
|
|||
Loading…
Reference in a new issue