Skip to content

Commit

Permalink
fix: Library load button does not work (excalidraw#5205)
Browse files Browse the repository at this point in the history
Co-authored-by: dwelle <[email protected]>
  • Loading branch information
zsviczian and dwelle authored May 18, 2022
1 parent bed9fca commit 605aa55
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/components/LibraryMenuItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,17 @@ const LibraryMenuItems = ({
icon={load}
onClick={async () => {
try {
await fileOpen({
description: "Excalidraw library files",
// ToDo: Be over-permissive until https://bugs.webkit.org/show_bug.cgi?id=34442
// gets resolved. Else, iOS users cannot open `.excalidraw` files.
/*
extensions: [".json", ".excalidrawlib"],
*/
await library.updateLibrary({
libraryItems: fileOpen({
description: "Excalidraw library files",
// ToDo: Be over-permissive until https://bugs.webkit.org/show_bug.cgi?id=34442
// gets resolved. Else, iOS users cannot open `.excalidraw` files.
/*
extensions: [".json", ".excalidrawlib"],
*/
}),
merge: true,
openLibraryMenu: true,
});
} catch (error: any) {
if (error?.name === "AbortError") {
Expand Down

0 comments on commit 605aa55

Please sign in to comment.