Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Don't show headers on empty bravery site setting lists
Browse files Browse the repository at this point in the history
Fix #4319

Auditors: @srirambv

Test Plan:
1. clean session store. go to apple.com and lower shields
2. verify that apple.com shows up in about:preferences#shields
3. raise shields on apple.com
4. verify that 'All Brave Shields' header is no longer in about:preferences#shields
  • Loading branch information
diracdeltas authored and bbondy committed Sep 29, 2016
1 parent 8e7ff3f commit 588706d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions js/about/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -998,8 +998,13 @@ class SitePermissionsPage extends React.Component {
return this.props.siteSettings.some((value) => {
if (value && value.get) {
for (let name in this.props.names) {
if (this.props.names[name].includes(typeof value.get(name))) {
return true
const granted = value.get(name)
if (this.props.names[name].includes(typeof granted)) {
if (this.props.defaults) {
return this.props.defaults.get(name) !== granted
} else {
return true
}
}
}
}
Expand Down

1 comment on commit 588706d

@srirambv
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++ works as expected

Please sign in to comment.