mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Fix a script error by deleting both labels in pages and highlights
This commit is contained in:
parent
a9b3a5c925
commit
9a2f4b300a
1 changed files with 1 additions and 1 deletions
|
|
@ -104,7 +104,7 @@ export const deleteLabel = async (
|
|||
index: INDEX_ALIAS,
|
||||
body: {
|
||||
script: {
|
||||
source: `if (ctx._source.highlights != null) {
|
||||
source: `if (ctx._source.highlights != null && ctx._source.highlights[0].labels != null) {
|
||||
ctx._source.highlights[0].labels.removeIf(label -> label.name == params.label)
|
||||
}
|
||||
if (ctx._source.labels != null) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue