RED-5741: Fixed special characters showing when there's a duplicate technical name.

This commit is contained in:
Nicoleta Panaghiu 2022-12-15 13:32:56 +02:00
parent db6f58e489
commit 73268f65c9

View File

@ -203,7 +203,7 @@ export class AddEditEntityComponent extends BaseFormComponent implements OnInit
let technicalName = baseTechnicalName.replaceAll(/[^A-Za-z0-9_-]/g, '');
let suffix = 1;
while (existingTechnicalNames.includes(technicalName)) {
technicalName = [baseTechnicalName, suffix++].join('_');
technicalName = [technicalName, suffix++].join('_');
}
return technicalName;
}