From 17ba85b0e5dd0d8758bb0e5af10b695deae3ae97 Mon Sep 17 00:00:00 2001 From: John Factotum <50942278+johnfactotum@users.noreply.github.com> Date: Sat, 11 Mar 2023 22:04:42 +0800 Subject: [PATCH] Typo --- view.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/view.js b/view.js index b410c6c..ff26729 100644 --- a/view.js +++ b/view.js @@ -92,11 +92,11 @@ export class View { const o = this.#getOverlayer(index) if (o) this.#drawAnnotation(o.doc, o.overlayer, annotation) const label = this.#tocProgress.getProgress(index)?.label ?? '' - this?.emit({ type: 'add-annotation', annotation, label, index, position }) + this.emit?.({ type: 'add-annotation', annotation, label, index, position }) }, onDelete: (key, index, position) => { this.#getOverlayer(index)?.overlayer?.remove(key) - this?.emit({ type: 'delete-annotation', index, position }) + this.emit?.({ type: 'delete-annotation', index, position }) }, onUpdate: (annotation, index) => { const o = this.#getOverlayer(index)