Skip to content

Commit a1eaca6

Browse files
authored
fix: snapshot must be object or null
1 parent 07c5115 commit a1eaca6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Lifecycles/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export class Lifecycles extends Component<ILifecyclesProps, {}> {
3131
}
3232

3333
getSnapshotBeforeUpdate(prevProps) {
34-
return this.props.getSnapshotBeforeUpdate(prevProps, this.props);
34+
return this.props.getSnapshotBeforeUpdate(prevProps, this.props) || null;
3535
}
3636

3737
componentDidUpdate (prevProps, prevState, snapshot) {

0 commit comments

Comments
 (0)