Skip to content

Commit 6b0591a

Browse files
authored
Merge pull request #65 from hayanmind/master
Fix unnecessary `this.reset()` call in the life cycle method
2 parents 07795e7 + b4dee32 commit 6b0591a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/CopilotModal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class CopilotModal extends Component<Props, State> {
6161
};
6262

6363
componentWillReceiveProps(nextProps: Props) {
64-
if (nextProps.visible === false) {
64+
if (this.props.visible === true && nextProps.visible === false) {
6565
this.reset();
6666
}
6767
}

0 commit comments

Comments
 (0)