瀏覽代碼

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

vanilla_orig
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> {
655 655
       if (
656 656
         token === this.id ||
657 657
         window.confirm(
658
-          t("alerts.confirmAddLibrary", { numShapes: json.library.length }),
658
+          t("alerts.confirmAddLibrary", {
659
+            numShapes: (json.libraryItems || json.library || []).length,
660
+          }),
659 661
         )
660 662
       ) {
661 663
         await this.library.importLibrary(blob, "published");

Loading…
取消
儲存