mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: make getEmbedLink independent of t function (#7643)
* fix: make getEmbedLink independent of t function * rename warning to error and make it type safe
This commit is contained in:
parent
0e0f34edd8
commit
0c3dffb082
4 changed files with 14 additions and 9 deletions
|
@ -6501,8 +6501,11 @@ class App extends React.Component<AppProps, AppState> {
|
|||
return;
|
||||
}
|
||||
|
||||
if (embedLink.warning) {
|
||||
this.setToast({ message: embedLink.warning, closable: true });
|
||||
if (embedLink.error instanceof URIError) {
|
||||
this.setToast({
|
||||
message: t("toast.unrecognizedLinkFormat"),
|
||||
closable: true,
|
||||
});
|
||||
}
|
||||
|
||||
const element = newEmbeddableElement({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue