diff --git a/ui/src/app/shared/edge/edgeconfig.ts b/ui/src/app/shared/edge/edgeconfig.ts index f844f341029..ebbe9001bbf 100644 --- a/ui/src/app/shared/edge/edgeconfig.ts +++ b/ui/src/app/shared/edge/edgeconfig.ts @@ -127,9 +127,11 @@ export class EdgeConfig { public getFactoriesByNature(natureId: string): EdgeConfig.Factory[] { let result = []; let nature = this.natures[natureId]; - for (let factoryId of nature.factoryIds) { - if (factoryId in this.factories) { - result.push(this.factories[factoryId]) + if (nature) { + for (let factoryId of nature.factoryIds) { + if (factoryId in this.factories) { + result.push(this.factories[factoryId]) + } } } return result;