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) {
nameIndex = originalName.split(found).pop();
if (nameIndex) index = parseInt(nameIndex, 10);
if (nameIndex) {
index = parseInt(nameIndex, 10);
}
baseName = uniqueName = found;
} else {
const nameMatch = originalName.match(/(.*\D+)(\d*)/);