Skip to content

Commit

Permalink
Check props formattingFn (#508)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmarkelov authored Jul 7, 2021
1 parent f38a59d commit deb2754
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/CountUp.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class CountUp extends Component {
decimals,
decimal,
className,
formattingFn
} = this.props;

const hasPropsChanged =
Expand All @@ -79,7 +80,8 @@ class CountUp extends Component {
separator !== updatedProps.separator ||
decimals !== updatedProps.decimals ||
decimal !== updatedProps.decimal ||
className !== updatedProps.className;
className !== updatedProps.className ||
formattingFn !== updatedProps.formattingFn;

return hasPropsChanged || redraw;
};
Expand Down

0 comments on commit deb2754

Please sign in to comment.