Fix error when PLAUSIBLE_HOST is missing
This commit is contained in:
parent
4a4070d423
commit
1ae9eb5387
1 changed files with 1 additions and 1 deletions
2
index.js
2
index.js
|
|
@ -62,7 +62,7 @@ async function handleRequest(event) {
|
|||
} else {
|
||||
// PLAUSIBLE_HOST should be the full URL to your Plausible Analytics instance
|
||||
// e.g. https://plausible.io/
|
||||
if (PLAUSIBLE_HOST !== undefined) {
|
||||
if (typeof PLAUSIBLE_HOST !== 'undefined') {
|
||||
const url = PLAUSIBLE_HOST + 'api/event'
|
||||
const headers = new Headers()
|
||||
headers.append('User-Agent', request.headers.get('User-Agent'))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue