Skip to content

🎥 Make videos programmatically with React

handle serveUrl being undefined

Jonny Burger8e0c91ddf090
diff --git a/packages/renderer/src/is-serve-url.ts b/packages/renderer/src/is-serve-url.ts
index d0cd82c28e..eedd14fcb2 100644
--- a/packages/renderer/src/is-serve-url.ts
+++ b/packages/renderer/src/is-serve-url.ts
@@ -1,4 +1,8 @@
export const isServeUrl = (potentialUrl: string) => {
+ if (typeof potentialUrl === 'undefined') {
+ throw new Error('serveUrl is undefined');
+ }
+
// Theoretically not a valid URL but handle the most basic cases of forgetting protocol in front
if (
potentialUrl.startsWith('www.') ||