Skip to content

Commit 2b8385b

Browse files
committed
Fix custom ranking sorting bug
1 parent dd02961 commit 2b8385b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/flow/flow.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ export class FlowService {
977977
orderBy: { id: 'asc' },
978978
});
979979

980-
const idsAscending = ranking.map((el) => el.id).sort();
980+
const idsAscending = ranking.map((el) => el.id).sort((a, b) => a - b);
981981

982982
if (idsAscending.length !== children.length)
983983
throw new BadRequestException(

0 commit comments

Comments
 (0)