Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

Commit 3d68e6f

Browse files
committed
Cosmetic changes for accuracy, clarity, and conformity
1 parent 7e9fbf1 commit 3d68e6f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/components/control-component.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -662,23 +662,24 @@ function createControlClass(s = defaultStrategy) {
662662
const modelString = getModel(model, state);
663663
const fieldValue = s.getFieldFromState(state, modelString)
664664
|| initialFieldState;
665+
const modelValue = s.get(state, modelString);
665666

666667
return {
667668
model: modelString,
668-
modelValue: s.get(state, modelString),
669+
modelValue,
669670
fieldValue,
670671
controlProps: finalControlProps,
671672
};
672673
}
673674

674675
const ConnectedControl = resolveModel(connect(mapStateToProps, null, null, {
675-
areOwnPropsEqual(ownProps, nextOwnProps) {
676-
return shallowEqual(ownProps, nextOwnProps, {
676+
areOwnPropsEqual(nextOwnProps, ownProps) {
677+
return shallowEqual(nextOwnProps, ownProps, {
677678
omitKeys: ['mapProps'],
678679
});
679680
},
680-
areStatePropsEqual(stateProps, nextStateProps) {
681-
return shallowEqual(stateProps, nextStateProps, {
681+
areStatePropsEqual(nextStateProps, stateProps) {
682+
return shallowEqual(nextStateProps, stateProps, {
682683
deepKeys: ['controlProps'],
683684
});
684685
},

0 commit comments

Comments
 (0)