mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
[Editor] Don't add an editor for empty FreeText annotations
This commit is contained in:
parent
5581e22cc7
commit
1ab34d2ae4
2 changed files with 27 additions and 0 deletions
|
@ -539,6 +539,10 @@ class FreeTextEditor extends AnnotationEditor {
|
|||
textContent,
|
||||
page: { pageNumber },
|
||||
} = data;
|
||||
if (!textContent || textContent.length === 0) {
|
||||
// Empty annotation.
|
||||
return null;
|
||||
}
|
||||
initialData = data = {
|
||||
annotationType: AnnotationEditorType.FREETEXT,
|
||||
color: Array.from(fontColor),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue