Skip to content

Commit

Permalink
Updated sort to leave gap for inserting new items
Browse files Browse the repository at this point in the history
  • Loading branch information
jzongker committed Jul 18, 2024
1 parent f4c98c3 commit 2fa3fb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/repositories/LinkRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export class LinkRepository {
const filtered = ArrayHelper.getAll(existing, "parentId", parentId);
const toSave: Link[] = [];
filtered.forEach((link, index) => {
if (link.sort !== index) {
link.sort = index;
if (link.sort !== index*2) {
link.sort = index*2;
toSave.push(link);
}
});
Expand Down

0 comments on commit 2fa3fb8

Please sign in to comment.