From e60e48e67dac6ca4c78e15d0606e8924d1647c1b Mon Sep 17 00:00:00 2001 From: David Luzar Date: Wed, 17 Nov 2021 20:54:40 +0100 Subject: [PATCH] fix: account for libraries v2 when prompting (#4263) --- src/components/App.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/App.tsx b/src/components/App.tsx index d4a54c28..4ac5de9d 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -655,7 +655,9 @@ class App extends React.Component { 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");