remove unnecessary variable comparation (#18598)
Since it will continue when the props are equal in line 767, there is no need to compare whether they are not equal.
BetaSu committed
Apr 14, 2020 at 21:53 UTC
1d7bd52688aba5edd27d7019bce15180bb0f78aa
1 file changed
+1
-4
packages/react-dom/src/client/ReactDOMComponent.js
+1
-4
@@ -824,10 +824,7 @@ export function diffProperties(
824
// inserted already.
825
}
826
} 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') {
828
(updatePayload = updatePayload || []).push(propKey, '' + nextProp);
829
}
830
} else if (