chore(project): satisfy eslint unicorn rules in board SSE handlers

This commit is contained in:
Oleks
2026-05-15 22:10:49 +03:00
parent 6d09f611ea
commit a02c4fb2ad
+3 -3
View File
@@ -286,7 +286,7 @@ function handleCardMoved(board: HTMLElement, payload: CardMovedPayload): void {
const target = board.querySelector<HTMLElement>(`#board_${payload.to_column_id}`);
if (!target) return;
const fromColumn = card.parentElement;
target.appendChild(card);
target.append(card);
if (fromColumn instanceof HTMLElement) {
const fromColumnEl = fromColumn.closest<HTMLElement>('.project-column');
if (fromColumnEl) updateColumnCount(fromColumnEl);
@@ -364,10 +364,10 @@ function handleColumnReordered(board: HTMLElement, payload: ColumnReorderedPaylo
// each column element in that order. appendChild on an existing
// node moves it rather than cloning, so the result is an in-place
// reorder.
const order = [...payload.columns].sort((a, b) => a.sorting - b.sorting);
const order = Array.from(payload.columns).sort((a, b) => a.sorting - b.sorting);
for (const entry of order) {
const el = board.querySelector<HTMLElement>(`.project-column[data-id="${entry.column_id}"]`);
if (el) board.appendChild(el);
if (el) board.append(el);
}
}