From 3f8efc46cd3e0ecbc024b4ee1099816bde5ee231 Mon Sep 17 00:00:00 2001 From: Anton Korzunov Date: Sat, 15 Jun 2019 23:14:53 +1000 Subject: [PATCH] fix: regression in hidden components reconcilation --- src/reconciler/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/reconciler/utils.js b/src/reconciler/utils.js index 43e27bffa..0e0df896c 100644 --- a/src/reconciler/utils.js +++ b/src/reconciler/utils.js @@ -67,10 +67,10 @@ export const areSwappable = (a, b) => { if (isFunctional(a)) { const nameA = getComponentDisplayName(a); - if (nameA === 'Component' || !areNamesEqual(nameA, getComponentDisplayName(b))) { + if (!areNamesEqual(nameA, getComponentDisplayName(b))) { return false; } - return haveTextSimilarity(String(a), String(b)); + return nameA !== 'Component' || haveTextSimilarity(String(a), String(b)); } return false; };