Skip to content

Commit 513c36d

Browse files
Claudehotlong
andauthored
Fix TypeScript error: add optional chaining for object.relationships
Agent-Logs-Url: https://github.com/objectstack-ai/objectui/sessions/e529b8a3-8ab3-4715-9ba6-77fd9fcd68cb Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 9d81925 commit 513c36d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/console/src/components/schema/objectDetailWidgets.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export function ObjectRelationshipsWidget({ schema }: { schema: ObjectWidgetSche
161161
</h3>
162162
{hasRelationships ? (
163163
<div className="space-y-3">
164-
{object.relationships.map((rel, i) => (
164+
{object.relationships?.map((rel, i) => (
165165
<div
166166
key={i}
167167
className="flex items-start gap-4 p-4 rounded-lg border bg-card hover:bg-accent/50 transition-colors"

0 commit comments

Comments
 (0)