Skip to content

Commit 1d7bd52

Browse files
authored
remove unnecessary variable comparation (facebook#18598)
Since it will continue when the props are equal in line 767, there is no need to compare whether they are not equal.
1 parent b928fc0 commit 1d7bd52

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

packages/react-dom/src/client/ReactDOMComponent.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -824,10 +824,7 @@ export function diffProperties(
824824
// inserted already.
825825
}
826826
} else if (propKey === CHILDREN) {
827-
if (
828-
lastProp !== nextProp &&
829-
(typeof nextProp === 'string' || typeof nextProp === 'number')
830-
) {
827+
if (typeof nextProp === 'string' || typeof nextProp === 'number') {
831828
(updatePayload = updatePayload || []).push(propKey, '' + nextProp);
832829
}
833830
} else if (

0 commit comments

Comments
 (0)