diff --git a/src/wizards/conductingequipment.ts b/src/wizards/conductingequipment.ts index 9cb7291da3..e7aa161f04 100644 --- a/src/wizards/conductingequipment.ts +++ b/src/wizards/conductingequipment.ts @@ -51,7 +51,9 @@ const types: Partial> = { function typeStr(condEq: Element): string { return condEq.getAttribute('type') === 'DIS' && - condEq.querySelector('Terminal')?.getAttribute('cNodeName') === 'grounded' + Array.from(condEq.querySelectorAll('Terminal')) + .map(t => t.getAttribute('cNodeName')) + .includes('grounded') ? 'ERS' : condEq.getAttribute('type') ?? ''; } diff --git a/src/zeroline/foundation.ts b/src/zeroline/foundation.ts index 87256ec158..38d0fb5496 100644 --- a/src/zeroline/foundation.ts +++ b/src/zeroline/foundation.ts @@ -226,7 +226,9 @@ export function getIcon(condEq: Element): TemplateResult { function typeStr(condEq: Element): string { if ( condEq.getAttribute('type') === 'DIS' && - condEq.querySelector('Terminal')?.getAttribute('cNodeName') === 'grounded' + Array.from(condEq.querySelectorAll('Terminal')) + .map(t => t.getAttribute('cNodeName')) + .includes('grounded') ) { return 'ERS'; } else {