mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Fix library import (#2360)
This commit is contained in:
parent
dad9ad9bf4
commit
5b829772d9
3 changed files with 14 additions and 6 deletions
|
@ -532,7 +532,7 @@ class App extends React.Component<ExcalidrawProps, AppState> {
|
|||
return false;
|
||||
}
|
||||
|
||||
private addToLibrary = async (url: string) => {
|
||||
private importLibraryFromUrl = async (url: string) => {
|
||||
window.history.replaceState({}, "Excalidraw", window.location.origin);
|
||||
try {
|
||||
const request = await fetch(url);
|
||||
|
@ -683,7 +683,7 @@ class App extends React.Component<ExcalidrawProps, AppState> {
|
|||
const addToLibraryUrl = searchParams.get("addLibrary");
|
||||
|
||||
if (addToLibraryUrl) {
|
||||
await this.addToLibrary(addToLibraryUrl);
|
||||
await this.importLibraryFromUrl(addToLibraryUrl);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue