Skip to content

Commit a886009

Browse files
Copilothotlong
andauthored
refactor(objectDetailWidgets): replace non-null assertion with optional chaining
Agent-Logs-Url: https://github.com/objectstack-ai/objectui/sessions/eb0d0766-8b77-462f-ac89-6dfeb9b0e31c Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent baa4b59 commit a886009

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)