@@ -117,12 +117,12 @@ export class $RefParser {
117117
118118 await resolveExternal ( this , this . options ) ;
119119 const errors = JSONParserErrorGroup . getParserErrors ( this ) ;
120- if ( errors . length > 0 ) {
120+ if ( errors . length ) {
121121 throw new JSONParserErrorGroup ( this ) ;
122122 }
123123 _bundle ( this , this . options ) ;
124124 const errors2 = JSONParserErrorGroup . getParserErrors ( this ) ;
125- if ( errors2 . length > 0 ) {
125+ if ( errors2 . length ) {
126126 throw new JSONParserErrorGroup ( this ) ;
127127 }
128128 return this . schema ! ;
@@ -148,14 +148,14 @@ export class $RefParser {
148148
149149 await resolveExternal ( this , this . options ) ;
150150 const errors = JSONParserErrorGroup . getParserErrors ( this ) ;
151- if ( errors . length > 0 ) {
151+ if ( errors . length ) {
152152 throw new JSONParserErrorGroup ( this ) ;
153153 }
154154 _bundle ( this , this . options ) ;
155155 // Merged root is ready for bundling
156156
157157 const errors2 = JSONParserErrorGroup . getParserErrors ( this ) ;
158- if ( errors2 . length > 0 ) {
158+ if ( errors2 . length ) {
159159 throw new JSONParserErrorGroup ( this ) ;
160160 }
161161 return this . schema ! ;
@@ -297,7 +297,7 @@ export class $RefParser {
297297
298298 public mergeMany ( ) : JSONSchema {
299299 const schemas = this . schemaMany || [ ] ;
300- if ( schemas . length === 0 ) {
300+ if ( ! schemas . length ) {
301301 throw ono ( 'mergeMany called with no schemas. Did you run parseMany?' ) ;
302302 }
303303
@@ -335,7 +335,7 @@ export class $RefParser {
335335 }
336336 }
337337 }
338- if ( Object . keys ( infoAccumulator ) . length > 0 ) {
338+ if ( Object . keys ( infoAccumulator ) . length ) {
339339 merged . info = infoAccumulator ;
340340 }
341341
@@ -356,7 +356,7 @@ export class $RefParser {
356356 }
357357 }
358358 }
359- if ( servers . length > 0 ) {
359+ if ( servers . length ) {
360360 merged . servers = servers ;
361361 }
362362
@@ -568,7 +568,7 @@ export class $RefParser {
568568 }
569569 }
570570
571- if ( tags . length > 0 ) {
571+ if ( tags . length ) {
572572 merged . tags = tags ;
573573 }
574574
0 commit comments