소스 검색

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

David Luzar 3 년 전
부모
커밋
e60e48e67d
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      src/components/App.tsx

+ 3 - 1
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");