Skip to content

Commit

Permalink
speed up component comparator
Browse files Browse the repository at this point in the history
  • Loading branch information
theKashey committed Jun 15, 2019
1 parent 8c1e276 commit fa781a8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/reconciler/componentComparator.js
Expand Up @@ -124,7 +124,10 @@ const compareComponents = (oldType, newType, setNewType, baseType) => {
return defaultResult;
}

if (newType !== oldType && areSignaturesCompatible(newType, oldType) && areSwappable(newType, oldType)) {
if (
defaultResult ||
(newType !== oldType && areSignaturesCompatible(newType, oldType) && areSwappable(newType, oldType))
) {
const unwrapFactory = newType[UNWRAP_PROXY];
const oldProxy = unwrapFactory && getProxyByType(unwrapFactory());
if (oldProxy) {
Expand Down

0 comments on commit fa781a8

Please sign in to comment.