Fix random crash

Fixes https://github.com/lbryio/lbry-desktop/issues/6918
This commit is contained in:
Thomas Zarebczan 2021-08-19 16:46:34 -04:00 committed by GitHub
parent 51576a827d
commit f8c568e301
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,7 +36,7 @@ export default function PreviewOverlayProperties(props: Props) {
} = props; } = props;
const isCollection = claim && claim.value_type === 'collection'; const isCollection = claim && claim.value_type === 'collection';
// $FlowFixMe // $FlowFixMe
const claimLength = claim && claim.value.claims && claim.value.claims.length; const claimLength = claim && claim.value && claim.value.claims && claim.value.claims.length;
const claimCount = editedCollection ? editedCollection.items.length : claimLength; const claimCount = editedCollection ? editedCollection.items.length : claimLength;
const isStream = claim && claim.value_type === 'stream'; const isStream = claim && claim.value_type === 'stream';