File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
nist-interface/src/pages/dashboardContainer/helper Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export const extractMetaData = async (collections) => {
2222 // convention for metadata collection_id: public.<agency>_<data_category>_<region>_metadata
2323 // example: public.nist_testbed_lam_metadata
2424 let metaCollection = collections . map ( collection => {
25- if ( collection && collection . id && collection . id . includes ( "metadata" ) ) {
25+ if ( collection && collection . id && collection . id . includes ( "metadata" ) && collection . id . includes ( "nist" ) ) {
2626 return collection ;
2727 }
2828 return null ;
@@ -40,6 +40,7 @@ export const extractMetaData = async (collections) => {
4040export const getMetaDataDictionary = ( collectionsMetaData ) => {
4141 const Dict = { } ;
4242 collectionsMetaData . forEach ( ( metaData ) => {
43+ if ( ! ( "station_code" in metaData ) ) return ;
4344 let stationCode = metaData [ "station_code" ] . toUpperCase ( ) ;
4445 if ( ! ( stationCode in Dict ) ) {
4546 Dict [ stationCode ] = { ...metaData } ;
@@ -52,4 +53,4 @@ export const getMetaDataDictionary = (collectionsMetaData) => {
5253const getStationId = ( collectionId ) => {
5354 const stationId = collectionId . split ( "_" ) [ 3 ] ;
5455 return stationId . toUpperCase ( ) ;
55- }
56+ }
You can’t perform that action at this time.
0 commit comments