A React component library for rendering common AT Protocol records for applications such as Bluesky and Leaflet.

be stricter about record being passed

+2 -3
lib/components/BlueskyPost.tsx
··· 203 203 ); 204 204 } 205 205 206 - // When record is provided, pass it directly to skip fetching 207 - if (record) { 206 + 207 + if (record !== undefined) { 208 208 return ( 209 209 <AtProtoRecord<FeedPostRecord> 210 210 record={record} ··· 215 215 ); 216 216 } 217 217 218 - // Otherwise fetch the record using did, collection, and rkey 219 218 return ( 220 219 <AtProtoRecord<FeedPostRecord> 221 220 did={repoIdentifier}
+1 -3
lib/components/BlueskyProfile.tsx
··· 135 135 ); 136 136 }; 137 137 138 - // When record is provided, pass it directly to skip fetching 139 - if (record) { 138 + if (record !== undefined) { 140 139 return ( 141 140 <AtProtoRecord<ProfileRecord> 142 141 record={record} ··· 147 146 ); 148 147 } 149 148 150 - // Otherwise fetch the record using did, collection, and rkey 151 149 return ( 152 150 <AtProtoRecord<ProfileRecord> 153 151 did={repoIdentifier}
+1 -3
lib/components/LeafletDocument.tsx
··· 121 121 ); 122 122 }; 123 123 124 - // When record is provided, pass it directly to skip fetching 125 - if (record) { 124 + if (record !== undefined) { 126 125 return ( 127 126 <AtProtoRecord<LeafletDocumentRecord> 128 127 record={record} ··· 133 132 ); 134 133 } 135 134 136 - // Otherwise fetch the record using did, collection, and rkey 137 135 return ( 138 136 <AtProtoRecord<LeafletDocumentRecord> 139 137 did={did}
+1 -3
lib/components/TangledString.tsx
··· 82 82 /> 83 83 ); 84 84 85 - // When record is provided, pass it directly to skip fetching 86 - if (record) { 85 + if (record !== undefined) { 87 86 return ( 88 87 <AtProtoRecord<TangledStringRecord> 89 88 record={record} ··· 94 93 ); 95 94 } 96 95 97 - // Otherwise fetch the record using did, collection, and rkey 98 96 return ( 99 97 <AtProtoRecord<TangledStringRecord> 100 98 did={did}