Skip to content

Commit 2cc9122

Browse files
committed
fix jshint errors for lib/native/query.js
1 parent 647110d commit 2cc9122

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/native/query.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ var Result = require(__dirname + '/../result');
88
//event emitter proxy
99
var NativeQuery = function(config, values, callback) {
1010
// use of "new" optional
11-
if (!(this instanceof NativeQuery)) return new NativeQuery(config, values, callback);
11+
if (!(this instanceof NativeQuery)) {
12+
return new NativeQuery(config, values, callback);
13+
}
1214

1315
EventEmitter.call(this);
1416

@@ -37,10 +39,10 @@ var mapRowData = function(row) {
3739
var result = {};
3840
for(var i = 0, len = row.length; i < len; i++) {
3941
var item = row[i];
40-
result[item.name] = item.value == null ? null : types.getTypeParser(item.type, 'text')(item.value);
42+
result[item.name] = item.value === null ? null : types.getTypeParser(item.type, 'text')(item.value);
4143
}
4244
return result;
43-
}
45+
};
4446

4547
p.handleRow = function(rowData) {
4648
var row = mapRowData(rowData);
@@ -61,7 +63,7 @@ p.handleError = function(error) {
6163
} else {
6264
this.emit('error', error);
6365
}
64-
}
66+
};
6567

6668
p.handleReadyForQuery = function(meta) {
6769
if (this._canceledDueToError) {
@@ -86,5 +88,5 @@ p.handleCopyFromChunk = function (chunk) {
8688
//if there are no stream (for example when copy to query was sent by
8789
//query method instead of copyTo) error will be handled
8890
//on copyOutResponse event, so silently ignore this error here
89-
}
91+
};
9092
module.exports = NativeQuery;

0 commit comments

Comments
 (0)