Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Commit

Permalink
Address issue with checking of homepage if the homepage did not have …
Browse files Browse the repository at this point in the history
…a protocol
  • Loading branch information
kartkand committed Jul 20, 2022
1 parent 0421622 commit 3491f51
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,14 @@ export function getHomepageChangeNeeded(homepage: string): boolean {
return false;
}

// Add a protocol to the url if it does not have one. This is needed for
// the match pattern checking to work in getEngineFromURL.
if (!/^(?:f|ht)tps?:\/\//.test(homepage)) {
homepage = "http://" + homepage;
}
if (getEngineFromURL(homepage)) {
return true;
}

return false;
}

Expand Down

0 comments on commit 3491f51

Please sign in to comment.