Skip to content

Commit 2cb7732

Browse files
authored
fix: code smell with nested template string (#1942)
1 parent 55642e8 commit 2cb7732

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

test/factories/item.factory.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ export const ItemFactory = (
1616
): ItemWithCreator => {
1717
const { parentPath, ...item } = itemArgs;
1818
const id = v4();
19-
const path = `${parentPath ? `${parentPath}.` : ''}${buildPathFromIds(id)}`;
19+
20+
const parentPrefix = parentPath ? `${parentPath}.` : '';
21+
const path = `${parentPrefix}${buildPathFromIds(id)}`;
2022

2123
return {
2224
type: ItemType.FOLDER,

0 commit comments

Comments
 (0)