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
···
);
}
-
// When record is provided, pass it directly to skip fetching
-
if (record) {
+
+
if (record !== undefined) {
return (
<AtProtoRecord<FeedPostRecord>
record={record}
···
);
}
-
// Otherwise fetch the record using did, collection, and rkey
return (
<AtProtoRecord<FeedPostRecord>
did={repoIdentifier}
+1 -3
lib/components/BlueskyProfile.tsx
···
);
};
-
// When record is provided, pass it directly to skip fetching
-
if (record) {
+
if (record !== undefined) {
return (
<AtProtoRecord<ProfileRecord>
record={record}
···
);
}
-
// Otherwise fetch the record using did, collection, and rkey
return (
<AtProtoRecord<ProfileRecord>
did={repoIdentifier}
+1 -3
lib/components/LeafletDocument.tsx
···
);
};
-
// When record is provided, pass it directly to skip fetching
-
if (record) {
+
if (record !== undefined) {
return (
<AtProtoRecord<LeafletDocumentRecord>
record={record}
···
);
}
-
// Otherwise fetch the record using did, collection, and rkey
return (
<AtProtoRecord<LeafletDocumentRecord>
did={did}
+1 -3
lib/components/TangledString.tsx
···
/>
);
-
// When record is provided, pass it directly to skip fetching
-
if (record) {
+
if (record !== undefined) {
return (
<AtProtoRecord<TangledStringRecord>
record={record}
···
);
}
-
// Otherwise fetch the record using did, collection, and rkey
return (
<AtProtoRecord<TangledStringRecord>
did={did}