Skip to content

Commit

Permalink
bugfix: check if highlightColors is present in options object
Browse files Browse the repository at this point in the history
  • Loading branch information
pistom committed Jan 24, 2020
1 parent 74690d2 commit 7f4f66f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion public/manifests/chrome.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Highlight or Hide Search Engine Results",
"short_name": "HoHSER",
"version": "3.3.0",
"version": "3.3.1",
"description": "Filter search engine results. Block unwanted results and highlight the favorite ones. For Google and other popular search engines.",
"icons": {
"19": "images/hohser-19.png",
Expand Down
2 changes: 1 addition & 1 deletion public/manifests/firefox.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Highlight or Hide Search Engine Results",
"short_name": "HoHSER",
"version": "3.3.0",
"version": "3.3.1",
"developer": {
"name": "Tomasz Pisarek",
"url": "https://github.com/pistom"
Expand Down
4 changes: 2 additions & 2 deletions src/components/DomainsList/DomainsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ class DomainsList extends React.Component<Props, State> {
}

componentDidMount (): void {
this.props.highlightColors.forEach( (color, i) => {
this.props.highlightColors?.forEach( (color, i) => {
this.domainColors['COLOR_' + (i+4)] = `#${color}`;
});
}

componentWillReceiveProps (nextProps: any): void {
if (this.props.highlightColors.length !== nextProps.highlightColors.length) {
if (this.props?.highlightColors.length !== nextProps.highlightColors?.length) {
nextProps.highlightColors.forEach( (color: string, i: number) => {
this.domainColors['COLOR_' + (i+4)] = `#${color}`;
});
Expand Down

0 comments on commit 7f4f66f

Please sign in to comment.