mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Introduce even more optional chaining in the code-base
This replaces a few more small/simple if-statements with optional chaining.
This commit is contained in:
parent
f89020e9b1
commit
ec7746350d
3 changed files with 7 additions and 12 deletions
|
@ -878,10 +878,8 @@ class AnnotationEditorUIManager {
|
|||
copy(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (this.#activeEditor) {
|
||||
// An editor is being edited so just commit it.
|
||||
this.#activeEditor.commitOrRemove();
|
||||
}
|
||||
// An editor is being edited so just commit it.
|
||||
this.#activeEditor?.commitOrRemove();
|
||||
|
||||
if (!this.hasSelection) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue