@@ -21,7 +21,7 @@ module.exports = resolveExternal;
2121 * The promise resolves once all JSON references in the schema have been resolved,
2222 * including nested references that are contained in externally-referenced files.
2323 */
24- function resolveExternal ( parser , options ) {
24+ function resolveExternal ( parser , options ) {
2525 if ( ! options . resolve . external ) {
2626 // Nothing to resolve, so exit early
2727 return Promise . resolve ( ) ;
@@ -36,7 +36,8 @@ function resolveExternal(parser, options) {
3636 options
3737 ) ;
3838 return Promise . all ( promises ) ;
39- } catch ( e ) {
39+ }
40+ catch ( e ) {
4041 return Promise . reject ( e ) ;
4142 }
4243}
@@ -56,7 +57,7 @@ function resolveExternal(parser, options) {
5657 * If any of the JSON references point to files that contain additional JSON references,
5758 * then the corresponding promise will internally reference an array of promises.
5859 */
59- function crawl ( obj , path , $refs , options , external , seen ) {
60+ function crawl ( obj , path , $refs , options , external , seen ) {
6061 seen = seen || new Set ( ) ;
6162 let promises = [ ] ;
6263
@@ -69,7 +70,8 @@ function crawl(obj, path, $refs, options, external, seen) {
6970 seen . add ( obj ) ; // Track previously seen objects to avoid infinite recursion
7071 if ( $Ref . isExternal$Ref ( obj ) ) {
7172 promises . push ( resolve$Ref ( obj , path , $refs , options ) ) ;
72- } else {
73+ }
74+ else {
7375 if ( external && $Ref . is$Ref ( obj ) ) {
7476 /* Correct the reference in the external document so we can resolve it */
7577 let withoutHash = url . stripHash ( path ) ;
@@ -106,7 +108,7 @@ function crawl(obj, path, $refs, options, external, seen) {
106108 * The promise resolves once all JSON references in the object have been resolved,
107109 * including nested references that are contained in externally-referenced files.
108110 */
109- async function resolve$Ref ( $ref , path , $refs , options ) {
111+ async function resolve$Ref ( $ref , path , $refs , options ) {
110112 // console.log('Resolving $ref pointer "%s" at %s', $ref.$ref, path);
111113
112114 let resolvedPath = url . resolve ( path , $ref . $ref ) ;
@@ -128,7 +130,8 @@ async function resolve$Ref($ref, path, $refs, options) {
128130 let promises = crawl ( result , withoutHash + "#" , $refs , options , true ) ;
129131
130132 return Promise . all ( promises ) ;
131- } catch ( err ) {
133+ }
134+ catch ( err ) {
132135 if ( ! options . continueOnError || ! isHandledError ( err ) ) {
133136 throw err ;
134137 }
0 commit comments