Skip to content

Commit

Permalink
fix hot destroy problem #623
Browse files Browse the repository at this point in the history
  • Loading branch information
erikras committed May 18, 2016
1 parent 3f481f4 commit 0b8dd94
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/reduxForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ const createReduxForm =

componentWillUnmount() {
const { destroyOnUnmount, destroy } = this.props
if (destroyOnUnmount) {
const isHotDev = process.env.NODE_ENV !== 'production' && module.hot;
if (destroyOnUnmount && !isHotDev) {
destroy()
}
}
Expand Down

0 comments on commit 0b8dd94

Please sign in to comment.