Skip to content

🎥 Make videos programmatically with React

Update public-license-key.tsx

Jonny Burger7219439be8ac
diff --git a/packages/renderer/src/options/public-license-key.tsx b/packages/renderer/src/options/public-license-key.tsx
index 751f4bc222..09de17dbaf 100644
--- a/packages/renderer/src/options/public-license-key.tsx
+++ b/packages/renderer/src/options/public-license-key.tsx
@@ -37,6 +37,12 @@ export const publicLicenseKeyOption = {
};
},
setConfig: (value: string | null) => {
+ if (value && value !== 'free-license' && !value.startsWith('rm_pub_')) {
+ throw new Error(
+ 'Invalid public license key. It must start with "rm_pub_" or be "free-license".',
+ );
+ }
+
currentPublicLicenseKey = value;
},
type: null as string | null,