diff --git a/packages/victory-core/src/victory-util/axis.tsx b/packages/victory-core/src/victory-util/axis.tsx index 993b4051f8..9b47978bb3 100644 --- a/packages/victory-core/src/victory-util/axis.tsx +++ b/packages/victory-core/src/victory-util/axis.tsx @@ -182,7 +182,7 @@ function getStringTicks(props) { function getTickArray(props) { const { tickValues, tickFormat } = props; - if(tickValues?.length === 0){ + if (tickValues?.length === 0) { return []; } @@ -282,8 +282,8 @@ export function getTicks(props, scale: D3Scale, filterZero = false) { const { tickCount } = props; const tickArray = getTickArray(props); - if(tickArray?.length === 0){ - return ['']; + if (tickArray?.length === 0) { + return [""]; } const tickValues = tickArray ? tickArray.map((v) => v.value) : undefined; @@ -317,7 +317,10 @@ export function getTicks(props, scale: D3Scale, filterZero = false) { function getDomainFromData(props, axis) { const { polar, startAngle = 0, endAngle = 360 } = props; const tickArray = getTickArray(props); - const tickValues = tickArray && tickArray?.length !== 0 ? tickArray.map((v) => v.value) : undefined; + const tickValues = + tickArray && tickArray?.length !== 0 + ? tickArray.map((v) => v.value) + : undefined; if (!Array.isArray(tickValues)) { return undefined; }