X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/25216cc7acedc987c26a159f0b640210c0ef101e..2454ac35292a79594c32a80430740317ed5005cf:/src/views-components/sharing-dialog/sharing-public-access-form.tsx

diff --git a/src/views-components/sharing-dialog/sharing-public-access-form.tsx b/src/views-components/sharing-dialog/sharing-public-access-form.tsx
index 2a216b04..8ee1d94d 100644
--- a/src/views-components/sharing-dialog/sharing-public-access-form.tsx
+++ b/src/views-components/sharing-dialog/sharing-public-access-form.tsx
@@ -6,7 +6,7 @@ import { reduxForm } from 'redux-form';
 import { compose } from 'redux';
 import { connect } from 'react-redux';
 import SharingPublicAccessFormComponent from './sharing-public-access-form-component';
-import { SHARING_PUBLIC_ACCESS_FORM_NAME } from 'store/sharing-dialog/sharing-dialog-types';
+import { SHARING_PUBLIC_ACCESS_FORM_NAME, VisibilityLevel } from 'store/sharing-dialog/sharing-dialog-types';
 import { RootState } from 'store/store';
 import { getSharingPublicAccessFormData } from '../../store/sharing-dialog/sharing-dialog-types';
 
@@ -16,8 +16,9 @@ export const SharingPublicAccessForm = compose(
     ),
     connect(
         (state: RootState) => {
-            const { visibility } = getSharingPublicAccessFormData(state);
+            const { visibility } = getSharingPublicAccessFormData(state) || { visibility: VisibilityLevel.PRIVATE };
             return { visibility };
         }
     )
 )(SharingPublicAccessFormComponent);
+
