Skip to content

Commit

Permalink
fix: prevent different typeof of components to be merged
Browse files Browse the repository at this point in the history
  • Loading branch information
theKashey committed Jul 4, 2019
1 parent 8d14827 commit 357249c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/reconciler/componentComparator.js
Expand Up @@ -99,8 +99,8 @@ const areDeepSwappable = (oldType, newType) => {
const compareComponents = (oldType, newType, setNewType, baseType) => {
let defaultResult = oldType === newType;

if ((oldType && !newType) || (!oldType && newType)) {
return false;
if ((oldType && !newType) || (!oldType && newType) || typeof oldType !== typeof newType) {
return defaultResult;
}

if (getIdByType(oldType)) {
Expand Down

0 comments on commit 357249c

Please sign in to comment.