Skip to content

Commit

Permalink
Fix default engine display problem for fresh profile
Browse files Browse the repository at this point in the history
Fix brave#3254

auditor: @bbondy
  • Loading branch information
darkdh committed Aug 20, 2016
1 parent 7b5f6d6 commit f82a848
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/about/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,12 @@ class GeneralTab extends ImmutableComponent {

class SearchSelectEntry extends ImmutableComponent {
shouldComponentUpdate (nextProps, nextState) {

This comment has been minimized.

Copy link
@bbondy

bbondy Aug 20, 2016

shouldComponentUpdate should never need to be specified for an ImmutableComponent. ImmutableComponent is only meant to be a component that gets props passed to it. It will get called when it's props change automatically. I think the whole function should be removed.

return this.props.settings.get(settings.DEFAULT_SEARCH_ENGINE) !== nextProps.settings.get(settings.DEFAULT_SEARCH_ENGINE)
return getSetting(settings.DEFAULT_SEARCH_ENGINE, this.props.settings) !==
getSetting(settings.DEFAULT_SEARCH_ENGINE, nextProps.settings)
}
render () {
return <div>
{this.props.settings.get(settings.DEFAULT_SEARCH_ENGINE) === this.props.name
{getSetting(settings.DEFAULT_SEARCH_ENGINE, this.props.settings) === this.props.name
? <span className='fa fa-check-square' id='searchSelectIcon' /> : null}
</div>
}
Expand Down

0 comments on commit f82a848

Please sign in to comment.