diff --git a/package-lock.json b/package-lock.json index 884df84ac..6261b0c10 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@jeremyckahn/farmhand", - "version": "1.16.0", + "version": "1.16.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@jeremyckahn/farmhand", - "version": "1.16.0", + "version": "1.16.1", "license": "GPL-2.0-or-later", "dependencies": { "@fortawesome/fontawesome-svg-core": "^1.2.27", diff --git a/package.json b/package.json index 5fee8a0a0..4a3761cad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@jeremyckahn/farmhand", - "version": "1.16.0", + "version": "1.16.1", "publishConfig": { "access": "public" }, diff --git a/src/config.js b/src/config.js index e121d7045..44a2e883f 100644 --- a/src/config.js +++ b/src/config.js @@ -29,7 +29,9 @@ export const features = Object.keys(process.env).reduce((acc, key) => { return acc }, {}) -const searchParams = new URLSearchParams(window.location.search) +// Use optional chaining here because window.location will not be defined when +// this is running in a Node.js context. +const searchParams = new URLSearchParams(window.location?.search) for (const key of searchParams.keys()) { const matches = key.match(/enable_(.*)/)