Skip to content

Commit

Permalink
fix: snapshot must be object or null
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich authored Dec 22, 2018
1 parent 07c5115 commit a1eaca6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Lifecycles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class Lifecycles extends Component<ILifecyclesProps, {}> {
}

getSnapshotBeforeUpdate(prevProps) {
return this.props.getSnapshotBeforeUpdate(prevProps, this.props);
return this.props.getSnapshotBeforeUpdate(prevProps, this.props) || null;
}

componentDidUpdate (prevProps, prevState, snapshot) {
Expand Down

1 comment on commit a1eaca6

@streamich
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build version: 2.9.2-master.151 🤞 master on Travis 🎉

Please sign in to comment.