Browse Source

fix: Don't show save file to disk when UIOptions.canvasActions.export.saveFileToDisk is false (#4073)

Aakansha Doshi 3 years ago
parent
commit
bc88cf5002
2 changed files with 3 additions and 1 deletions
  1. 2 0
      src/packages/excalidraw/CHANGELOG.md
  2. 1 1
      src/packages/excalidraw/index.tsx

+ 2 - 0
src/packages/excalidraw/CHANGELOG.md

@@ -33,6 +33,8 @@ Please add the latest change on the top under the correct section.
 
 ### Fixes
 
+- Don't show save file to disk button in export dialog when `saveFileToDisk` passed as `false` in [`UIOptions.canvasActions.export`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#exportOpts).
+
 - [`onPaste`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#onPaste) prop should return false to prevent the native excalidraw paste action [#3974](https://github.com/excalidraw/excalidraw/pull/3974).
 
   #### BREAKING CHANGE

+ 1 - 1
src/packages/excalidraw/index.tsx

@@ -47,7 +47,7 @@ const Excalidraw = (props: ExcalidrawProps) => {
 
   if (canvasActions?.export) {
     UIOptions.canvasActions.export.saveFileToDisk =
-      canvasActions.export?.saveFileToDisk ||
+      canvasActions.export?.saveFileToDisk ??
       DEFAULT_UI_OPTIONS.canvasActions.export.saveFileToDisk;
   }