Skip to content

Commit 01a1a94

Browse files
committed
Fix ReferenceOneField
1 parent 1be8e73 commit 01a1a94

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

packages/ra-ui-materialui/src/field/ReferenceOneField.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,18 @@ export const ReferenceOneField = <
8888
) : null;
8989

9090
if (
91-
!record ||
92-
(!controllerProps.isPending &&
93-
!controllerProps.isPaused &&
94-
controllerProps.referenceRecord == null)
91+
!record &&
92+
!controllerProps.isPending &&
93+
!controllerProps.isPaused &&
94+
controllerProps.referenceRecord == null
9595
) {
9696
return empty;
9797
}
9898

9999
if (
100-
!record ||
101-
(controllerProps.isPaused && controllerProps.referenceRecord == null)
100+
!record &&
101+
controllerProps.isPaused &&
102+
controllerProps.referenceRecord == null
102103
) {
103104
return offline;
104105
}

0 commit comments

Comments
 (0)