Use early return
This commit is contained in:
parent
0cf6605b8d
commit
ae7e7578db
@ -35,7 +35,9 @@ function _castColumnToEpoch(columnName) {
|
||||
}
|
||||
|
||||
function getColumnsWithWrappedDates(query) {
|
||||
if (query) {
|
||||
if(!query){
|
||||
return;
|
||||
}
|
||||
if (query.match(/\b_cdb_epoch_transformation\b/)) {
|
||||
const columns = [];
|
||||
const fieldMatcher = /\bdate_part\('epoch', "([^"]+)"\) as "([^"]+)"/gmi;
|
||||
@ -48,7 +50,6 @@ function getColumnsWithWrappedDates(query) {
|
||||
} while (match);
|
||||
return columns;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
Loading…
Reference in New Issue
Block a user