Fix TypeError (reading 'moderated') (#722)

Co-authored-by: ekzyis <ek@stacker.news>
This commit is contained in:
ekzyis 2023-12-30 21:40:06 +01:00 committed by GitHub
parent c23799be81
commit 3a0c50566b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ export function PostForm ({ type, sub, children }) {
<Alert className='position-absolute' style={{ top: '-6rem' }} variant='danger' onClose={() => setErrorMessage(undefined)} dismissible>
{errorMessage}
</Alert>}
<SubSelect prependSubs={['pick territory']} className='w-auto d-flex' noForm sub={sub?.name} hint={sub.moderated && 'this territory is moderated'} />
<SubSelect prependSubs={['pick territory']} className='w-auto d-flex' noForm sub={sub?.name} hint={sub?.moderated && 'this territory is moderated'} />
{postButtons}
<div className='d-flex mt-4'>
@ -170,7 +170,7 @@ export default function Post ({ sub }) {
<SubInfo />
</span>
}
hint={sub.moderated && 'this territory is moderated'}
hint={sub?.moderated && 'this territory is moderated'}
/>}
</PostForm>
</>