Merge remote-tracking branch 'origin/release' into danieljgeiger-mathjax-maint-stage

This commit is contained in:
Daniel J. Geiger 2023-11-03 19:11:26 -05:00
commit daf305af34
163 changed files with 9277 additions and 3561 deletions

View file

@ -611,7 +611,7 @@ const ExcalidrawWrapper = () => {
canvas: HTMLCanvasElement,
) => {
if (exportedElements.length === 0) {
return window.alert(t("alerts.cannotExportEmptyCanvas"));
throw new Error(t("alerts.cannotExportEmptyCanvas"));
}
if (canvas) {
try {
@ -627,7 +627,7 @@ const ExcalidrawWrapper = () => {
);
if (errorMessage) {
setErrorMessage(errorMessage);
throw new Error(errorMessage);
}
if (url) {
@ -637,7 +637,7 @@ const ExcalidrawWrapper = () => {
if (error.name !== "AbortError") {
const { width, height } = canvas;
console.error(error, { width, height });
setErrorMessage(error.message);
throw new Error(error.message);
}
}
}
@ -717,6 +717,11 @@ const ExcalidrawWrapper = () => {
},
});
}}
onSuccess={() => {
excalidrawAPI?.updateScene({
appState: { openDialog: null },
});
}}
/>
);
},