File tree 2 files changed +8
-7
lines changed
specifyweb/frontend/js_src/lib/components
2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -111,12 +111,13 @@ function Field({
111
111
( ) =>
112
112
field ?. isRelationship === true
113
113
? hasTablePermission ( field . relatedModel . name , 'read' )
114
- ? resource ?. specifyModel . getField ( field ?. name ) === undefined
115
- ? ''
116
- : resource
117
- ?. rgetPromise ( field . name )
118
- . then ( format )
119
- . then ( ( value ) => value ?? '' )
114
+ ? (
115
+ resource ?. rgetPromise ( field . name ) as Promise <
116
+ SpecifyResource < AnySchema > | undefined
117
+ >
118
+ )
119
+ ?. then ( format )
120
+ . then ( ( value ) => value ?? '' ) ?? ''
120
121
: userText . noPermission ( )
121
122
: undefined ,
122
123
/*
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ export function getDomainResource<
31
31
console . error (
32
32
`Trying to access domain resource ${ level } before domain is loaded`
33
33
) ;
34
- return ;
34
+ return undefined ;
35
35
}
36
36
const model = strictGetModel ( level ) ;
37
37
return new model . Resource ( { id } ) ;
You can’t perform that action at this time.
0 commit comments