Skip to content

Commit

Permalink
Fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
wylieconlon committed Jun 30, 2021
1 parent 480bbc3 commit 39ddde8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const formulaOperation: OperationDefinition<

const visibleOperationsMap = filterByVisibleOperation(operationDefinitionMap);
const { root, error } = tryToParse(column.params.formula, visibleOperationsMap);
if (error || typeof root === 'undefined' || root == null) {
if (error || root == null) {
return error?.message ? [error.message] : [];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function parseAndExtract(
label?: string
) {
const { root, error } = tryToParse(text, operationDefinitionMap);
if (error || typeof root === 'undefined' || root == null) {
if (error || root == null) {
return { extracted: [], isValid: false };
}
// before extracting the data run the validation task and throw if invalid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,6 @@ function getExpressionForLayer(
}
);

const allDateHistogramFields = Object.values(columns)
.map((column) =>
column.operationType === dateHistogramOperation.type ? column.sourceField : null
)
.filter((field): field is string => Boolean(field));

if (esAggEntries.length === 0) {
return {
type: 'expression',
Expand All @@ -256,6 +250,12 @@ function getExpressionForLayer(
};
}

const allDateHistogramFields = Object.values(columns)
.map((column) =>
column.operationType === dateHistogramOperation.type ? column.sourceField : null
)
.filter((field): field is string => Boolean(field));

return {
type: 'expression',
chain: [
Expand Down

0 comments on commit 39ddde8

Please sign in to comment.