@@ -275,8 +275,10 @@ const dataSourceListToMap = (dataSources: any[]) =>
275
275
dataSources . reduce (
276
276
( protocolKinds , dataSource ) =>
277
277
protocolKinds . update ( Protocol . normalizeName ( dataSource . kind ) , ( networks : any ) =>
278
- ( networks || immutable . OrderedMap ( ) ) . update ( dataSource . network , ( dataSourceNames : any ) =>
279
- ( dataSourceNames || immutable . OrderedSet ( ) ) . add ( dataSource . name ) ,
278
+ ( networks || immutable . OrderedMap ( ) ) . update (
279
+ dataSource . network ?? '' ,
280
+ ( dataSourceNames : any ) =>
281
+ ( dataSourceNames || immutable . OrderedSet ( ) ) . add ( dataSource . name ) ,
280
282
) ,
281
283
) ,
282
284
immutable . OrderedMap ( ) ,
@@ -294,9 +296,9 @@ const validateDataSourceProtocolAndNetworks = (value: any) => {
294
296
message : `Conflicting protocol kinds used in data sources and templates:
295
297
${ protocolNetworkMap
296
298
. map (
297
- ( dataSourceNames : any , protocolKind : string | undefined ) =>
299
+ ( dataSourceNames : any , protocolKind : string ) =>
298
300
` ${
299
- protocolKind === undefined
301
+ protocolKind === ''
300
302
? 'Data sources and templates having no protocol kind set'
301
303
: `Data sources and templates using '${ protocolKind } '`
302
304
} :\n${ dataSourceNames
@@ -320,9 +322,9 @@ Recommendation: Make all data sources and templates use the same protocol kind.`
320
322
message : `Conflicting networks used in data sources and templates:
321
323
${ networks
322
324
. map (
323
- ( dataSources : any , network : string | undefined ) =>
325
+ ( dataSources : any , network : string ) =>
324
326
` ${
325
- network === undefined
327
+ network === ''
326
328
? 'Data sources and templates having no network set'
327
329
: `Data sources and templates using '${ network } '`
328
330
} :\n${ dataSources . map ( ( ds : string ) => ` - ${ ds } ` ) . join ( '\n' ) } `,
0 commit comments