Skip to content

Commit

Permalink
chore: format with prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Makeen Sabree committed Nov 7, 2023
1 parent 2620ef7 commit 4b9bb9c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/victory-core/src/victory-util/axis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ function getStringTicks(props) {
function getTickArray(props) {
const { tickValues, tickFormat } = props;

if(tickValues?.length === 0){
if (tickValues?.length === 0) {
return [];
}

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 4b9bb9c

Please sign in to comment.