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