Skip to content

Commit ee28d2f

Browse files
committed
simplify
1 parent 056a9a7 commit ee28d2f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

web_src/js/features/repo-settings-branches.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ export function initRepoBranchesSettings() {
1212

1313
onEnd: () => {
1414
(async () => {
15-
const newOrder = Array.from(protectedBranchesList.children, (item) => {
15+
const itemIds = Array.from(protectedBranchesList.children, (item) => {
1616
const id = item.getAttribute('data-id');
1717
return parseInt(id);
18-
}).filter((id) => !Number.isNaN(id));
18+
});
1919

2020
try {
2121
await POST(protectedBranchesList.getAttribute('data-update-priority-url'), {
2222
data: {
23-
ids: newOrder,
23+
ids: itemIds,
2424
},
2525
});
2626
} catch (err) {

0 commit comments

Comments
 (0)