mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
parent
5c26bd19d7
commit
fc58e51ab3
10 changed files with 193 additions and 118 deletions
|
@ -315,18 +315,18 @@ const LayerUI = ({
|
|||
scale,
|
||||
) => {
|
||||
if (canvas) {
|
||||
try {
|
||||
await exportCanvas(type, exportedElements, appState, canvas, {
|
||||
exportBackground: appState.exportBackground,
|
||||
name: appState.name,
|
||||
viewBackgroundColor: appState.viewBackgroundColor,
|
||||
scale,
|
||||
shouldAddWatermark: appState.shouldAddWatermark,
|
||||
await exportCanvas(type, exportedElements, appState, canvas, {
|
||||
exportBackground: appState.exportBackground,
|
||||
name: appState.name,
|
||||
viewBackgroundColor: appState.viewBackgroundColor,
|
||||
scale,
|
||||
shouldAddWatermark: appState.shouldAddWatermark,
|
||||
})
|
||||
.catch(muteFSAbortError)
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
setAppState({ errorMessage: error.message });
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
setAppState({ errorMessage: error.message });
|
||||
}
|
||||
}
|
||||
};
|
||||
return (
|
||||
|
@ -351,8 +351,11 @@ const LayerUI = ({
|
|||
appState,
|
||||
);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
setAppState({ errorMessage: error.message });
|
||||
if (error.name !== "AbortError") {
|
||||
const { width, height } = canvas;
|
||||
console.error(error, { width, height });
|
||||
setAppState({ errorMessage: error.message });
|
||||
}
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue