Use operator assignement and remove redundant else
This commit is contained in:
parent
285c3fefc5
commit
ce90977163
1 changed files with 7 additions and 7 deletions
|
|
@ -54,7 +54,7 @@
|
|||
while (i < j && i < k) {
|
||||
if (oldFilenameParts[i] === newFilenameParts[i]) {
|
||||
prefixPaths.push(newFilenameParts[i]);
|
||||
i = i + 1;
|
||||
i += 1;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
|
@ -63,8 +63,8 @@
|
|||
while (j > i && k > i) {
|
||||
if (oldFilenameParts[j] === newFilenameParts[k]) {
|
||||
suffixPaths.unshift(newFilenameParts[k]);
|
||||
j = j - 1;
|
||||
k = k - 1;
|
||||
j -= 1;
|
||||
k -= 1;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
|
@ -82,10 +82,10 @@
|
|||
return finalPrefix + separator + '{' + oldRemainingPath + ' → ' + newRemainingPath + '}';
|
||||
} else if (finalSuffix.length) {
|
||||
return '{' + oldRemainingPath + ' → ' + newRemainingPath + '}' + separator + finalSuffix;
|
||||
} else {
|
||||
return oldFilename + ' → ' + newFilename;
|
||||
}
|
||||
|
||||
return oldFilename + ' → ' + newFilename;
|
||||
|
||||
} else if (newFilename && !isDevNullName(newFilename)) {
|
||||
return newFilename;
|
||||
} else if (oldFilename) {
|
||||
|
|
@ -180,9 +180,9 @@
|
|||
function unifyPath(path) {
|
||||
if (path) {
|
||||
return path.replace('\\', '/');
|
||||
} else {
|
||||
return path;
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
function isDevNullName(name) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue