Skip to content

Commit

Permalink
fix: fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
p-chan committed Feb 12, 2022
1 parent 8d82746 commit bfd2426
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sort.ts
Expand Up @@ -21,7 +21,7 @@ export const sort = (target: any, depth: number = 0) => {
})
.forEach((item) => {
if (Array.isArray(item) || typeof item === 'object') {
return sort(item, depth + 1)
return nextArray.push(sort(item, depth + 1))
}

return nextArray.push(item)
Expand Down

0 comments on commit bfd2426

Please sign in to comment.