diff --git a/apps/OpenSignServer/cloud/parsefunction/encryptedPdf.js b/apps/OpenSignServer/cloud/parsefunction/encryptedPdf.js index 7fb6c58cf..315cf737b 100644 --- a/apps/OpenSignServer/cloud/parsefunction/encryptedPdf.js +++ b/apps/OpenSignServer/cloud/parsefunction/encryptedPdf.js @@ -1,6 +1,6 @@ import { PostHog } from 'posthog-node'; const ph_project_api_key = process.env.PH_PROJECT_API_KEY; -const client = new PostHog(ph_project_api_key); +const client = ph_project_api_key ? new PostHog(ph_project_api_key) : ''; export default async function encryptedpdf(request) { const email = request.params.email; if (client) {