Add braces to condition

This commit is contained in:
Iván Ovejero 2021-12-01 09:44:56 +01:00
parent c81d47cb1a
commit 845b5e4d9b

View file

@ -640,7 +640,9 @@ export const getUniqueNodeName = ({
if (found) { if (found) {
nameIndex = originalName.split(found).pop(); nameIndex = originalName.split(found).pop();
if (nameIndex) index = parseInt(nameIndex, 10); if (nameIndex) {
index = parseInt(nameIndex, 10);
}
baseName = uniqueName = found; baseName = uniqueName = found;
} else { } else {
const nameMatch = originalName.match(/(.*\D+)(\d*)/); const nameMatch = originalName.match(/(.*\D+)(\d*)/);