on master help sign in
transfer: safer star lockup detection

In the event that star release store fails to fetch lockup details, it will store a `Just(null)` value instead. Here, we need to account for the possibility that `a` is null and cannot be indexed into. Fixes #908.

commit9554f117b2c8e145bd7cca123dc6612889680fd0 authorfang <github@fang.io> dateThu 3 Feb 2022, 20:24 (5 years ago) parent169cfaf
1 file changed+3−1
src/views/UrbitID/Transfer.tsx+3−1
src/views/UrbitID/Transfer.tsx+3−1
@@ -70,7 +70,9 @@ export default function AdminTransfer() {
7070 const az = azimuth.azimuth;
7171 return (
7272 az.getPointSize(point.value) === az.PointSize.Galaxy &&
73− starReleaseDetails.map((a: any) => a.kind).getOrElse('none') !== 'none'
73+ starReleaseDetails
74+ .map((a: any) => a?.kind || 'none')
75+ .getOrElse('none') !== 'none'
7476 );
7577 }, [starReleaseDetails, point]);
7678