@@ -275,8 +275,10 @@ const dataSourceListToMap = (dataSources: any[]) =>
275275 dataSources . reduce (
276276 ( protocolKinds , dataSource ) =>
277277 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 ) ,
280282 ) ,
281283 ) ,
282284 immutable . OrderedMap ( ) ,
@@ -294,9 +296,9 @@ const validateDataSourceProtocolAndNetworks = (value: any) => {
294296 message : `Conflicting protocol kinds used in data sources and templates:
295297${ protocolNetworkMap
296298 . map (
297- ( dataSourceNames : any , protocolKind : string | undefined ) =>
299+ ( dataSourceNames : any , protocolKind : string ) =>
298300 ` ${
299- protocolKind === undefined
301+ protocolKind === ''
300302 ? 'Data sources and templates having no protocol kind set'
301303 : `Data sources and templates using '${ protocolKind } '`
302304 } :\n${ dataSourceNames
@@ -320,9 +322,9 @@ Recommendation: Make all data sources and templates use the same protocol kind.`
320322 message : `Conflicting networks used in data sources and templates:
321323${ networks
322324 . map (
323- ( dataSources : any , network : string | undefined ) =>
325+ ( dataSources : any , network : string ) =>
324326 ` ${
325- network === undefined
327+ network === ''
326328 ? 'Data sources and templates having no network set'
327329 : `Data sources and templates using '${ network } '`
328330 } :\n${ dataSources . map ( ( ds : string ) => ` - ${ ds } ` ) . join ( '\n' ) } `,
0 commit comments