diff --git a/CHANGES.md b/CHANGES.md index 2357a0a..80501be 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Changelog +## v4.2.1 + +- Fix browser check + ## 4.2.0 - Port to TypeScript diff --git a/package.json b/package.json index ff99de6..81e30a3 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/public/manifest.json b/public/manifest.json index 2389a83..d0a73ef 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -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", diff --git a/source/options/components/Provider.svelte b/source/options/components/Provider.svelte index 8cd2446..a8f44e0 100644 --- a/source/options/components/Provider.svelte +++ b/source/options/components/Provider.svelte @@ -23,7 +23,7 @@ $: iconUrl = getIcon(provider.icon); const uploadIcon = () => { - if (isFirefox) { + if (!isFirefox) { errorMsg = getMessage("msgIconUploadNotSupported"); return; } diff --git a/source/utils.ts b/source/utils.ts index 9105a04..6d85ab9 100644 --- a/source/utils.ts +++ b/source/utils.ts @@ -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;