Explorar el Código

fix: add missing hook dependency

Arnošt Pleskot hace 2 años
padre
commit
1f62bd8c67
Se han modificado 1 ficheros con 7 adiciones y 1 borrados
  1. 7 1
      src/components/ImageExportDialog.tsx

+ 7 - 1
src/components/ImageExportDialog.tsx

@@ -149,7 +149,13 @@ const ImageExportModal = ({
     } else {
       setExportBaseScale(defaultExportScale);
     }
-  }, [actionManager, exportedElements, previewRef]);
+  }, [
+    actionManager,
+    exportedElements,
+    previewRef,
+    exportWithBackground,
+    exportBackgroundImage,
+  ]);
 
   useEffect(() => {
     const previewNode = previewRef.current;