File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @inspatial/cloud" ,
3- "version" : " 0.7.27 " ,
3+ "version" : " 0.7.28 " ,
44 "license" : " Apache-2.0" ,
55 "exports" : {
66 "." : " ./mod.ts" ,
Original file line number Diff line number Diff line change @@ -189,11 +189,15 @@ export class BaseClass<N extends string = string> {
189189 const def = this . _getFieldDef < "ConnectionField" > (
190190 field . fetchField . connectionField ,
191191 ) ;
192- const value = await this . _db . getValue (
193- `entry_${ def . entryType } ` ,
194- this . _data . get ( def . key ) ,
195- field . fetchField . fetchField ,
196- ) ;
192+ const id = this . _data . get ( def . key ) ;
193+ let value = field . defaultValue ;
194+ if ( id ) {
195+ value = await this . _db . getValue (
196+ `entry_${ def . entryType } ` ,
197+ id ,
198+ field . fetchField . fetchField ,
199+ ) ;
200+ }
197201 this [ `$${ field . key } ` as keyof typeof this ] = value ;
198202 }
199203 }
You can’t perform that action at this time.
0 commit comments