We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2bc438 commit 498a077Copy full SHA for 498a077
client/components/main/Main/ConnectionSelector/Config.jsx
@@ -35,6 +35,13 @@ class Config extends React.Component {
35
if (!this.props.connect && nextProps.connect) {
36
this.connect();
37
}
38
+ const leaving =
39
+ (!this.props.favorite && nextProps.favorite) ||
40
+ (this.props.favorite && !nextProps.favorite) ||
41
+ (this.props.favorite.get('key') !== nextProps.favorite.get('key'));
42
+ if (leaving) {
43
+ this.setState({ changed: false, data: new Immutable.Map() });
44
+ }
45
46
47
connect() {
0 commit comments