Skip to content

🎥 Make videos programmatically with React

handle case for comp without default props

Patric Salvisberg7c76dcc385ee
diff --git a/packages/cli/src/editor/components/RightPanel.tsx b/packages/cli/src/editor/components/RightPanel.tsx
index 9b6445a452..92aa790743 100644
--- a/packages/cli/src/editor/components/RightPanel.tsx
+++ b/packages/cli/src/editor/components/RightPanel.tsx
@@ -129,10 +129,11 @@ export const RightPanel: React.FC<{}> = () => {
}, [composition, props]);
const unsavedChangesExist = useMemo(() => {
- if (composition === null) {
+ if (composition === null || composition.defaultProps === undefined) {
return false;
}
+ console.log(composition.defaultProps);
return !deepEqual(composition.defaultProps, actualProps);
}, [actualProps, composition]);