File tree Expand file tree Collapse file tree 1 file changed +10
-18
lines changed Expand file tree Collapse file tree 1 file changed +10
-18
lines changed Original file line number Diff line number Diff line change @@ -154,17 +154,13 @@ class MySQLTable {
154
154
) ;
155
155
}
156
156
157
- if ( cb ) {
158
- sqlString = this . _db . format ( sqlString , values ) ;
159
- } else if ( values ) {
160
- if ( typeof values === 'function' ) {
161
- cb = values ;
162
- } else {
157
+ if ( typeof sqlString === 'string' ) {
158
+ if ( typeof values === 'object' ) {
163
159
sqlString = this . _db . format ( sqlString , values ) ;
160
+ } else {
161
+ cb = values ;
164
162
}
165
- } else if ( sqlString === undefined ) {
166
- sqlString = '' ;
167
- } else if ( typeof sqlString === 'function' ) {
163
+ } else {
168
164
cb = sqlString ;
169
165
sqlString = '' ;
170
166
}
@@ -234,17 +230,13 @@ class MySQLTable {
234
230
) ;
235
231
}
236
232
237
- if ( cb ) {
238
- sqlString = this . _db . format ( sqlString , values ) ;
239
- } else if ( values ) {
240
- if ( typeof values === 'function' ) {
241
- cb = values ;
242
- } else {
233
+ if ( typeof sqlString === 'string' ) {
234
+ if ( typeof values === 'object' ) {
243
235
sqlString = this . _db . format ( sqlString , values ) ;
236
+ } else {
237
+ cb = values ;
244
238
}
245
- } else if ( sqlString === undefined ) {
246
- sqlString = '' ;
247
- } else if ( typeof sqlString === 'function' ) {
239
+ } else {
248
240
cb = sqlString ;
249
241
sqlString = '' ;
250
242
}
You can’t perform that action at this time.
0 commit comments