Skip to content

🎥 Make videos programmatically with React

@remotion/studio: Document menu portal DOM guard

Jonny Burger8dc8a6c38e56
diff --git a/packages/studio/src/components/Menu/portals.ts b/packages/studio/src/components/Menu/portals.ts
index a79e61d0f7..48be2343e6 100644
--- a/packages/studio/src/components/Menu/portals.ts
+++ b/packages/studio/src/components/Menu/portals.ts
@@ -8,6 +8,7 @@ const portalIds = [
];
export const portals: Element[] =
+ // This module is imported by Bun tests that run without a DOM.
typeof document === 'undefined'
? []
: portalIds.map((id) => document.getElementById(id) as Element);