@@ -126,25 +126,23 @@ ESConnector.prototype.connect = function (callback) {
126
126
if ( error ) {
127
127
console . log ( 'ESConnector.prototype.connect' , 'ping' , 'failed' , error ) ;
128
128
log ( 'ESConnector.prototype.connect' , 'ping' , 'failed' , error ) ;
129
- callback ( null , self . db ) ;
130
- } else {
131
- if ( self . settings . mappingProperties ) {
132
- self . setupMappings ( )
133
- . then ( function ( ) {
134
- log ( 'ESConnector.prototype.connect' , 'setupMappings' , 'finished' ) ;
135
- callback && callback ( null , self . db ) ;
136
- } )
137
- . catch ( function ( err ) {
138
- log ( 'ESConnector.prototype.connect' , 'setupMappings' , 'failed' , err ) ;
139
- callback && callback ( null , self . db ) ;
140
- } ) ;
141
- } else {
142
- process . nextTick ( function ( ) {
143
- callback && callback ( null , self . db ) ;
144
- } ) ;
145
- }
146
129
}
147
130
} ) ;
131
+ if ( self . settings . mappingProperties ) {
132
+ self . setupMappings ( )
133
+ . then ( function ( ) {
134
+ log ( 'ESConnector.prototype.connect' , 'setupMappings' , 'finished' ) ;
135
+ callback && callback ( null , self . db ) ;
136
+ } )
137
+ . catch ( function ( err ) {
138
+ log ( 'ESConnector.prototype.connect' , 'setupMappings' , 'failed' , err ) ;
139
+ callback && callback ( null , self . db ) ;
140
+ } ) ;
141
+ } else {
142
+ process . nextTick ( function ( ) {
143
+ callback && callback ( null , self . db ) ;
144
+ } ) ;
145
+ }
148
146
}
149
147
} ;
150
148
0 commit comments