Skip to content

Commit

Permalink
Fix checks
Browse files Browse the repository at this point in the history
  • Loading branch information
VladLasitsa committed May 13, 2022
1 parent 097f85c commit e114ceb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ export const getLegendAction = (

const { table } = layer;
const accessor = getAccessorByDimension(layer.splitAccessor, table.columns);
const formatter = formatFactory(accessor ? getFormat(table.columns, layer.splitAccessor) : undefined);
const formatter = formatFactory(
accessor ? getFormat(table.columns, layer.splitAccessor) : undefined
);

const rowIndex = table.rows.findIndex((row) => {
if (formattedDatatables[layer.layerId]?.formattedColumns[accessor]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ export function XYChart({
: undefined;

const xAxisFormatter = formatFactory(
dataLayers[0].xAccessor ? getFormat(dataLayers[0].table.columns, dataLayers[0].xAccessor) : undefined
dataLayers[0].xAccessor
? getFormat(dataLayers[0].table.columns, dataLayers[0].xAccessor)
: undefined
);

// This is a safe formatter for the xAccessor that abstracts the knowledge of already formatted layers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ export function getColorAssignments(
}
const splitAccessor = getAccessorByDimension(layer.splitAccessor, layer.table.columns);
const column = layer.table.columns?.find(({ id }) => id === splitAccessor);
const columnFormatter = column && formatFactory(getFormat(layer.table.columns, layer.splitAccessor));
const columnFormatter =
column && formatFactory(getFormat(layer.table.columns, layer.splitAccessor));
const splits =
!column || !layer.table
? []
Expand Down

0 comments on commit e114ceb

Please sign in to comment.