Skip to content

Commit 74a2e67

Browse files
committed
fix removeAnnotation method
1 parent 7a0e686 commit 74a2e67

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/modules/annotations/Annotations.js

+9
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,15 @@ export default class Annotations {
317317
}
318318
})
319319

320+
Object.keys(w.config.annotations).forEach((key) => {
321+
const annotationArray = w.config.annotations[key]
322+
323+
if (Array.isArray(annotationArray)) {
324+
// remove entry from the config, so on the next update it doesn't come back
325+
w.config.annotations[key] = annotationArray.filter((m) => m.id !== id)
326+
}
327+
})
328+
320329
Array.prototype.forEach.call(annos, (a) => {
321330
a.parentElement.removeChild(a)
322331
})

0 commit comments

Comments
 (0)