Files
wekan/models/lib/openCardPresence.js
T
Lauri Ojansivu 951b072b58 Close card details after remote removal
Observe the card that opened each details view and clear desktop, mobile route, and popup state when another client removes it or moves it to a different board. Add positive, negative, wiring, and mobile browser regressions.\n\nThanks to rptl and xet7 !\n\nFixes #3114,
2026-08-25 17:45:40 +03:00

12 lines
497 B
JavaScript

'use strict';
// Decide whether a card-details window still belongs on the board where it was
// opened. A missing card means another client deleted/archived it (or moved it
// outside the current publication); a changed boardId means it was moved to a
// different board while another subscription still happens to retain it.
function openCardIsUnavailable(card, openedBoardId) {
return !card || !openedBoardId || card.boardId !== openedBoardId;
}
module.exports = { openCardIsUnavailable };