From bc88cf50024ebb96b1a4dbbc109a0181600343c6 Mon Sep 17 00:00:00 2001 From: Aakansha Doshi Date: Tue, 19 Oct 2021 14:39:47 +0530 Subject: [PATCH] fix: Don't show save file to disk when UIOptions.canvasActions.export.saveFileToDisk is false (#4073) --- src/packages/excalidraw/CHANGELOG.md | 2 ++ src/packages/excalidraw/index.tsx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/packages/excalidraw/CHANGELOG.md b/src/packages/excalidraw/CHANGELOG.md index b7c98d56..5154f052 100644 --- a/src/packages/excalidraw/CHANGELOG.md +++ b/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 diff --git a/src/packages/excalidraw/index.tsx b/src/packages/excalidraw/index.tsx index 1d3c72a7..449a1c38 100644 --- a/src/packages/excalidraw/index.tsx +++ b/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; }