]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-10669 Favorite star not reset after navigating to searched project
authorPascal Mugnier <pascal.mugnier@sonarsource.com>
Mon, 28 May 2018 09:00:49 +0000 (11:00 +0200)
committerSonarTech <sonartech@sonarsource.com>
Tue, 5 Jun 2018 18:20:51 +0000 (20:20 +0200)
server/sonar-web/src/main/js/components/controls/FavoriteBase.tsx

index 0d4dc401c97b2ad614bfcd3e6050cabf93cee532..a1bd2cc6866d020e14eb358a7a8c452360af5127 100644 (file)
@@ -48,7 +48,7 @@ export default class FavoriteBase extends React.PureComponent<Props, State> {
   }
 
   componentWillReceiveProps(nextProps: Props) {
-    if (nextProps.favorite !== this.props.favorite && nextProps.favorite !== this.state.favorite) {
+    if (nextProps.favorite !== this.props.favorite || nextProps.favorite !== this.state.favorite) {
       this.setState({ favorite: nextProps.favorite });
     }
   }