Skip to content

Commit

Permalink
Add early return to diffProperties
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytrorykun committed Apr 16, 2024
1 parent 0347fcd commit ef7101d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,11 @@ function diffProperties(
nextProps: Object,
validAttributes: AttributeConfiguration,
): null | Object {

if (prevProps === nextProps) {
return updatePayload; // no change
}

let attributeConfig;
let nextProp;
let prevProp;
Expand Down

0 comments on commit ef7101d

Please sign in to comment.