Skip to content

Commit

Permalink
fix apexcharts#4644; clearAnnotations fix
Browse files Browse the repository at this point in the history
  • Loading branch information
junedchhipa committed Aug 20, 2024
1 parent 2a04c09 commit ed44372
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/modules/annotations/Annotations.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,14 @@ export default class Annotations {
)

// annotations added externally should be cleared out too
w.globals.memory.methodsToExec.map((m, i) => {
if (m.label === 'addText' || m.label === 'addAnnotation') {
for (let i = w.globals.memory.methodsToExec.length - 1; i >= 0; i--) {
if (
w.globals.memory.methodsToExec[i].label === 'addText' ||
w.globals.memory.methodsToExec[i].label === 'addAnnotation'
) {
w.globals.memory.methodsToExec.splice(i, 1)
}
})
}

annos = Utils.listToArray(annos)

Expand Down

0 comments on commit ed44372

Please sign in to comment.