@@ -1323,26 +1323,28 @@ export function getSingleSampleTypeQueryInfo(sampleIds: number[] | string[]): Pr
13231323 schemaQuery : SCHEMAS . EXP_TABLES . MATERIALS ,
13241324 filterArray : [ Filter . create ( 'RowId' , sampleIds , Filter . Types . IN ) ] ,
13251325 columns : [ 'SampleSet/Name' ] ,
1326- } ) . then ( response => {
1327- const sampleTypes = new Set < string > ( ) ;
1328- for ( const row of response . rows ) {
1329- const sampleType = caseInsensitive ( row , 'SampleSet/Name' ) . value ;
1330- sampleTypes . add ( sampleType ) ;
1331- if ( sampleTypes . size > 1 ) {
1332- resolve ( null ) ; // multiple sample types found
1333- return ;
1326+ } )
1327+ . then ( response => {
1328+ const sampleTypes = new Set < string > ( ) ;
1329+ for ( const row of response . rows ) {
1330+ const sampleType = caseInsensitive ( row , 'SampleSet/Name' ) . value ;
1331+ sampleTypes . add ( sampleType ) ;
1332+ if ( sampleTypes . size > 1 ) {
1333+ resolve ( null ) ; // multiple sample types found
1334+ return ;
1335+ }
13341336 }
1335- }
1336- const sampleTypeName = Array . from ( sampleTypes ) [ 0 ] ;
1337- if ( sampleTypeName ) {
1338- const sampleTypeSQ = new SchemaQuery ( SCHEMAS . SAMPLE_SETS . SCHEMA , sampleTypeName ) ;
1339- sampleTypeQueryInfo = getQueryDetails ( sampleTypeSQ ) ;
1340- }
1341- resolve ( sampleTypeQueryInfo ) ;
1342- } ) . catch ( e => {
1343- console . error ( 'Unable to retrieve sample type' , e ) ;
1344- reject ( resolveErrorMessage ( e ) ) ;
1345- } ) ;
1337+ const sampleTypeName = Array . from ( sampleTypes ) [ 0 ] ;
1338+ if ( sampleTypeName ) {
1339+ const sampleTypeSQ = new SchemaQuery ( SCHEMAS . SAMPLE_SETS . SCHEMA , sampleTypeName ) ;
1340+ sampleTypeQueryInfo = getQueryDetails ( sampleTypeSQ ) ;
1341+ }
1342+ resolve ( sampleTypeQueryInfo ) ;
1343+ } )
1344+ . catch ( e => {
1345+ console . error ( 'Unable to retrieve sample type' , e ) ;
1346+ reject ( resolveErrorMessage ( e ) ) ;
1347+ } ) ;
13461348 } ) ;
13471349}
13481350export function getSampleIdentifyingFieldGridData (
0 commit comments