From e772b4203eb31ae5b407430be64a57c6daefc066 Mon Sep 17 00:00:00 2001 From: Alex van Andel Date: Wed, 12 Oct 2022 02:40:52 +0100 Subject: [PATCH] Unlicensed should return false, not error --- packages/features/ee/common/server/checkLicense.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/features/ee/common/server/checkLicense.ts b/packages/features/ee/common/server/checkLicense.ts index bbf2953e4b..961c66e2ce 100644 --- a/packages/features/ee/common/server/checkLicense.ts +++ b/packages/features/ee/common/server/checkLicense.ts @@ -20,6 +20,7 @@ const schemaLicenseKey = z async function checkLicense(license: string): Promise { if (!!process.env.NEXT_PUBLIC_IS_E2E) return true; + if (!license) return false; const url = `${CONSOLE_URL}/api/license?key=${schemaLicenseKey.parse(license)}`; const cachedResponse = cache.get(url); if (cachedResponse) {