Skip to content

Virtual whiteboard for sketching hand-drawn like diagrams

fix: account for libraries v2 when prompting (#4263)

David Luzare60e48e67dac
diff --git a/src/components/App.tsx b/src/components/App.tsx
index d4a54c2806..4ac5de9dfb 100644
--- a/src/components/App.tsx
+++ b/src/components/App.tsx
@@ -655,7 +655,9 @@ class App extends React.Component<AppProps, AppState> {
if (
token === this.id ||
window.confirm(
- t("alerts.confirmAddLibrary", { numShapes: json.library.length }),
+ t("alerts.confirmAddLibrary", {
+ numShapes: (json.libraryItems || json.library || []).length,
+ }),
)
) {
await this.library.importLibrary(blob, "published");