@@ -168,9 +168,8 @@ function containsEarthSwitchDefinition(condEq: Element): boolean {
168
168
*/
169
169
export function typeStr ( condEq : Element ) : string {
170
170
if (
171
- containsGroundedTerminal ( condEq ) ||
172
- ( condEq . getAttribute ( 'type' ) === 'DIS' &&
173
- containsEarthSwitchDefinition ( condEq ) )
171
+ condEq . getAttribute ( 'type' ) === 'DIS' &&
172
+ ( containsGroundedTerminal ( condEq ) || containsEarthSwitchDefinition ( condEq ) )
174
173
) {
175
174
// these checks only carried out for a three phase system
176
175
return 'ERS' ;
@@ -268,7 +267,10 @@ export function createAction(parent: Element): WizardActor {
268
267
} ;
269
268
}
270
269
271
- export function reservedNamesConductingEquipment ( parent : Element , currentName ?: string | null ) : string [ ] {
270
+ export function reservedNamesConductingEquipment (
271
+ parent : Element ,
272
+ currentName ?: string | null
273
+ ) : string [ ] {
272
274
return Array . from ( parent . querySelectorAll ( 'ConductingEquipment' ) )
273
275
. filter ( isPublic )
274
276
. map ( condEq => condEq . getAttribute ( 'name' ) ?? '' )
@@ -287,15 +289,22 @@ export function createConductingEquipmentWizard(parent: Element): Wizard {
287
289
label : get ( 'add' ) ,
288
290
action : createAction ( parent ) ,
289
291
} ,
290
- content : renderConductingEquipmentWizard ( '' , '' , 'create' , '' , reservedNames ) ,
292
+ content : renderConductingEquipmentWizard (
293
+ '' ,
294
+ '' ,
295
+ 'create' ,
296
+ '' ,
297
+ reservedNames
298
+ ) ,
291
299
} ,
292
300
] ;
293
301
}
294
302
295
303
export function editConductingEquipmentWizard ( element : Element ) : Wizard {
296
304
const reservedNames = reservedNamesConductingEquipment (
297
305
< Element > element . parentNode ! ,
298
- element . getAttribute ( 'name' ) ) ;
306
+ element . getAttribute ( 'name' )
307
+ ) ;
299
308
300
309
return [
301
310
{
0 commit comments