Skip to content

🎥 Make videos programmatically with React

No Crash when pressing reset button

Jonny Burger3468bf37654d
diff --git a/packages/studio/src/components/GlobalPropsEditorUpdateButton.tsx b/packages/studio/src/components/GlobalPropsEditorUpdateButton.tsx
index 64d69723d5..f24d6e3618 100644
--- a/packages/studio/src/components/GlobalPropsEditorUpdateButton.tsx
+++ b/packages/studio/src/components/GlobalPropsEditorUpdateButton.tsx
@@ -36,7 +36,16 @@ export const GlobalPropsEditorUpdateButton: React.FC<{
const onReset = useCallback(() => {
window.remotion_ignoreFastRefreshUpdate = null;
- window.dispatchEvent(new CustomEvent(Internals.PROPS_UPDATED_EXTERNALLY));
+ window.dispatchEvent(
+ new CustomEvent<{resetUnsaved: boolean}>(
+ Internals.PROPS_UPDATED_EXTERNALLY,
+ {
+ detail: {
+ resetUnsaved: false,
+ },
+ },
+ ),
+ );
}, []);
return (