Skip to content

Commit

Permalink
Merge pull request #89 from ngraef/patch-1
Browse files Browse the repository at this point in the history
fix new object comparison logic bug
  • Loading branch information
ckifer authored Mar 21, 2024
2 parents 3ad17a7 + 841b53b commit c97647e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Animate.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class Animate extends PureComponent {
const newState = {
style: attributeName ? { [attributeName]: from } : from,
};
if ((attributeName && [attributeName] !== from) || (!attributeName && style !== from)) {
if ((attributeName && style[attributeName] !== from) || (!attributeName && style !== from)) {
// eslint-disable-next-line react/no-did-update-set-state
this.setState(newState);
}
Expand Down

0 comments on commit c97647e

Please sign in to comment.