mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
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.
This commit is contained in:
+1
-4
@@ -824,10 +824,7 @@ export function diffProperties(
|
||||
// inserted already.
|
||||
}
|
||||
} else if (propKey === CHILDREN) {
|
||||
if (
|
||||
lastProp !== nextProp &&
|
||||
(typeof nextProp === 'string' || typeof nextProp === 'number')
|
||||
) {
|
||||
if (typeof nextProp === 'string' || typeof nextProp === 'number') {
|
||||
(updatePayload = updatePayload || []).push(propKey, '' + nextProp);
|
||||
}
|
||||
} else if (
|
||||
|
||||
Reference in New Issue
Block a user