chore: lint using putout

This commit is contained in:
coderaiser
2021-05-15 01:17:17 +03:00
parent 24f431b290
commit d046e2a77f
17 changed files with 41 additions and 41 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ export function clone<T>(val: T, depth: number = 5): T {
for (const key in val) {
// Recursively clone eack item unless we're at the maximum depth
clonedObject[key] = depth <= 1 ? val[key] : (val[key] ? clone(val[key], depth - 1) : val[key]);
clonedObject[key] = depth <= 1 ? val[key] : (val[key] && clone(val[key], depth - 1));
}
return clonedObject as T;