File tree Expand file tree Collapse file tree
apps/api/src/instrument-records Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ type ExpandDataType =
3434 success : true ;
3535 }
3636 | {
37- success : false ;
3837 message : string ;
38+ success : false ;
3939 } ;
4040
4141@Injectable ( )
@@ -166,7 +166,7 @@ export class InstrumentRecordsService {
166166 instruments . set ( record . instrumentId , instrument ) ;
167167 }
168168 for ( const [ measureKey , measureValue ] of Object . entries ( record . computedMeasures ) ) {
169- if ( ! measureValue ) {
169+ if ( measureValue == null ) {
170170 continue ;
171171 }
172172
@@ -191,7 +191,7 @@ export class InstrumentRecordsService {
191191
192192 if ( Array . isArray ( measureValue ) && measureValue . length >= 1 ) {
193193 const arrayResult = this . expandData ( measureValue ) ;
194- arrayResult . map ( ( arrayEntry : ExpandDataType ) => {
194+ arrayResult . forEach ( ( arrayEntry : ExpandDataType ) => {
195195 if ( ! arrayEntry . success ) throw new Error ( arrayEntry . message ) ;
196196 data . push ( {
197197 groupId : record . subject . groupIds [ 0 ] ?? DEFAULT_GROUP_NAME ,
You can’t perform that action at this time.
0 commit comments