Skip to content

Commit

Permalink
Fix program detection
Browse files Browse the repository at this point in the history
  • Loading branch information
sgotre committed Jan 11, 2018
1 parent ede7fad commit a7739cf
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 3 deletions.
Binary file modified dist/chrome.zip
Binary file not shown.
Binary file modified dist/firefox.zip
Binary file not shown.
Binary file modified dist/opera.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "__MSG_appName__",
"version": "3.3.0.1",
"version": "3.3.0.2",
"manifest_version": 2,
"description": "__MSG_appDescription__",
"icons": {
Expand Down
5 changes: 3 additions & 2 deletions src/scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,9 +533,10 @@ function hasProgram(hostname) {

// find program in allPrograms
let programIndex = result.allPrograms.findIndex((program) => {
return program.platformId === result.countryPlatform && (hostname.endsWith('/' + program.programUrl) === true || hostname.endsWith('.' + program.programUrl) === true )
if (program.platformId !== result.countryPlatform) return false;
return (hostname.endsWith('/' + program.programUrl) === true || hostname.endsWith('.' + program.programUrl) === true )
});
if (programIndex > 0 ) {
if (programIndex >= 0 ) {
resolve(result.allPrograms[programIndex]);
} else {
resolve(false);
Expand Down

0 comments on commit a7739cf

Please sign in to comment.