fix 'this' scope with arrow function

This commit is contained in:
Simon Martín 2017-10-04 11:10:17 +02:00
parent fe4c22d2ea
commit 8fe31c45f3

View File

@ -26,7 +26,7 @@ module.exports = class BaseDataview {
return callback(err);
}
psql.query(query, function(err, result) {
psql.query(query, (err, result) => {
if (err) {
return callback(err, result);
}
@ -48,7 +48,7 @@ module.exports = class BaseDataview {
const readOnlyTransaction = true;
const columnTypeQuery = columnTypeQueryTpl({ column, query });
psql.query(columnTypeQuery, function(err, result) {
psql.query(columnTypeQuery, (err, result) => {
if (err) {
return callback(err);
}