Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #505 from vtex/fix/hot-module-replacement
Browse files Browse the repository at this point in the history
Check if WrappedComponent implementation changed since last render to fix HMR
  • Loading branch information
calebmer committed Mar 6, 2017
2 parents b70b833 + 2ed91e1 commit 57e5a72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/graphql.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ export default function graphql(
const clientProps = this.calculateResultProps(data);
const mergedPropsAndData = assign({}, props, clientProps);

if (!shouldRerender && renderedElement) {
if (!shouldRerender && renderedElement && renderedElement.type === WrappedComponent) {
return renderedElement;
}

Expand Down

0 comments on commit 57e5a72

Please sign in to comment.