Skip to content

Commit

Permalink
Fix browser check
Browse files Browse the repository at this point in the history
  • Loading branch information
Brawl345 committed Aug 13, 2024
1 parent 8de6347 commit a8bc9ee
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v4.2.1

- Fix browser check

## 4.2.0

- Port to TypeScript
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "reverse-image-search",
"description": "Reverse Image Search",
"version": "4.2.0",
"version": "4.2.1",
"author": "Brawl345",
"license": "Unlicense",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__",
"author": "Andreas Bielawski",
"version": "4.2.0",
"version": "4.2.1",
"icons": {
"16": "icons/16.png",
"32": "icons/32.png",
Expand Down
2 changes: 1 addition & 1 deletion source/options/components/Provider.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
$: iconUrl = getIcon(provider.icon);
const uploadIcon = () => {
if (isFirefox) {
if (!isFirefox) {
errorMsg = getMessage("msgIconUploadNotSupported");
return;
}
Expand Down
5 changes: 3 additions & 2 deletions source/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@ export const base64EncodeIcon = (ctx: CanvasRenderingContext2D): string => {
return jpegBase64;
};

// @ts-ignore
export const isFirefox = window.browser && browser.runtime;
export const isFirefox =
// @ts-ignore
typeof window !== 'undefined' && window.browser && browser.runtime;

0 comments on commit a8bc9ee

Please sign in to comment.