Skip to content

Commit

Permalink
fix(graphCardHelpers): sw-1537 confirm callback is func (#1187)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcabrera committed Sep 12, 2023
1 parent 9432ab5 commit 1d65fd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/graphCard/graphCardHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ const xAxisTickFormat = ({ callback, date, granularity, tick, previousDate } = {
return undefined;
}

if (callback) {
if (typeof callback === 'function') {
return callback({ callback, date, granularity, tick, previousDate });
}

Expand Down Expand Up @@ -288,7 +288,7 @@ const xAxisTickFormat = ({ callback, date, granularity, tick, previousDate } = {
* @returns {string}
*/
const yAxisTickFormat = ({ callback, tick } = {}) => {
if (callback) {
if (typeof callback === 'function') {
return callback({ tick });
}

Expand Down

0 comments on commit 1d65fd8

Please sign in to comment.