Explorar el Código

refactor private legacy page

yuken hace 4 años
padre
commit
a254221e0b
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      packages/app/src/components/PrivateLegacyPages.tsx

+ 2 - 2
packages/app/src/components/PrivateLegacyPages.tsx

@@ -174,8 +174,8 @@ export const PrivateLegacyPages = (props: Props): JSX.Element => {
       toastSuccess(t('private_legacy_pages.toaster.page_migration_succeeded'));
     });
 
-    socket?.on(SocketEventName.PageMigrationError, (data: PageMigrationErrorData) => {
-      if (data.paths.length === 0) {
+    socket?.on(SocketEventName.PageMigrationError, (data?: PageMigrationErrorData) => {
+      if (data == null || data.paths.length === 0) {
         toastError(t('private_legacy_pages.toaster.page_migration_failed'));
       }
       else {