🎥 Make videos programmatically with React
validate only being called in a browser
Jonny Burger6c29294d15be
diff --git a/packages/layout-utils/src/layouts/measure-text.ts b/packages/layout-utils/src/layouts/measure-text.tsindex 8fba6bc325..7dd96c72c2 100644--- a/packages/layout-utils/src/layouts/measure-text.ts+++ b/packages/layout-utils/src/layouts/measure-text.ts@@ -26,6 +26,10 @@ const takeMeasurement = ({boundingBox: DOMRect;computedFontFamily: string;} => {+ if (typeof document === 'undefined') {+ throw new Error('measureText() can only be called in a browser.');+ }+const node = document.createElement('span');if (fontFamily) {