File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2688,7 +2688,7 @@ class PDFEditor {
26882688 */
26892689 #makePageLabelsTree( ) {
26902690 const { pageLabels } = this ;
2691- if ( ! pageLabels || pageLabels . length === 0 ) {
2691+ if ( ! pageLabels ? .length ) {
26922692 return ;
26932693 }
26942694 const { rootDict } = this ;
@@ -2776,7 +2776,7 @@ class PDFEditor {
27762776
27772777 #makeStructTree( ) {
27782778 const { structTreeKids } = this ;
2779- if ( ! structTreeKids || structTreeKids . length === 0 ) {
2779+ if ( ! structTreeKids ? .length ) {
27802780 return ;
27812781 }
27822782 const { rootDict } = this ;
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ class InkDrawOutliner {
7272 }
7373
7474 isEmpty ( ) {
75- return ! this . #lines || this . #lines . length === 0 ;
75+ return ! this . #lines?. length ;
7676 }
7777
7878 isCancellable ( ) {
Original file line number Diff line number Diff line change @@ -800,7 +800,7 @@ class FreeTextEditor extends AnnotationEditor {
800800 } = data ;
801801 // textContent is supposed to be an array of strings containing each line
802802 // of text. However, it can be null or empty.
803- if ( ! textContent || textContent . length === 0 ) {
803+ if ( ! textContent ? .length ) {
804804 // Empty annotation.
805805 return null ;
806806 }
Original file line number Diff line number Diff line change @@ -846,7 +846,7 @@ const PDFViewerApplication = {
846846
847847 fileInput . addEventListener ( "change" , function ( evt ) {
848848 const { files } = evt . target ;
849- if ( ! files || files . length === 0 ) {
849+ if ( ! files ? .length ) {
850850 return ;
851851 }
852852 eventBus . dispatch ( "fileinputchange" , {
Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ class DrawOpDetailView {
237237 header . textContent = name ;
238238 argsContainer . append ( header ) ;
239239
240- if ( ! args || args . length === 0 ) {
240+ if ( ! args ? .length ) {
241241 const none = document . createElement ( "div" ) ;
242242 none . className = "detail-empty" ;
243243 none . textContent = "(no arguments)" ;
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ class TextAccessibilityManager {
138138 }
139139
140140 const children = this . #textChildren;
141- if ( ! children || children . length === 0 ) {
141+ if ( ! children ? .length ) {
142142 return ;
143143 }
144144
@@ -198,7 +198,7 @@ class TextAccessibilityManager {
198198 }
199199
200200 const children = this . #textChildren;
201- if ( ! children || children . length === 0 ) {
201+ if ( ! children ? .length ) {
202202 return null ;
203203 }
204204
You can’t perform that action at this time.
0 commit comments