mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-23 01:10:10 +02: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:
@@ -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({
|
||||
|
Reference in New Issue
Block a user