Skip to content

Commit

Permalink
Allow constants.js to be used in non-extension environments (#1998)
Browse files Browse the repository at this point in the history
  • Loading branch information
sammacbeth committed May 22, 2023
1 parent c57b9f2 commit 9bdba36
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion shared/data/constants.js
Expand Up @@ -4,7 +4,10 @@ const browserInfo = parseUserAgentString()
const trackerBlockingEndpointBase = 'https://staticcdn.duckduckgo.com/trackerblocking'

function isMV3 () {
return chrome?.runtime.getManifest().manifest_version === 3
if (typeof chrome !== 'undefined') {
return chrome?.runtime.getManifest().manifest_version === 3
}
return false
}

function getConfigFileName () {
Expand Down

0 comments on commit 9bdba36

Please sign in to comment.