Skip to content

Commit 84024e0

Browse files
authored
[IN-316]: Update headers constant (#64)
* refactor(lib): assess window type instead of process * chore(package): v5.0.1
1 parent 4abb398 commit 84024e0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": false,
33
"name": "@what3words/api",
4-
"version": "5.0.0",
4+
"version": "5.0.1",
55
"description": "what3words JavaScript API",
66
"homepage": "https://github.com/what3words/w3w-node-wrapper#readme",
77
"main": "dist/index.js",

src/lib/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const W3W_REGEX =
66
export const VERSION = '__VERSION__';
77
export const HEADERS = {
88
'X-W3W-Wrapper':
9-
typeof process === 'undefined'
9+
typeof window !== 'undefined'
1010
? `what3words-JavaScript/${VERSION} (${window.navigator.userAgent})`
1111
: `what3words-Node/${VERSION} (Node ${process.version}; ${getPlatform(
1212
platform()

0 commit comments

Comments
 (0)