1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-08-09 15:35:29 +02:00

fix: Cleaned data before passing further (removed open)

This commit is contained in:
RAR 2023-01-08 18:52:18 +01:00
parent f5d83d0456
commit fb2681f8c7

View file

@ -10,8 +10,9 @@ import { createLocalId } from '../../../utils/local-id';
export function* createCard(listId, data) {
const { boardId } = yield select(selectors.selectListById, listId);
const { open, ...cleanData } = data;
const nextData = {
...data,
...cleanData,
position: yield select(selectors.selectNextCardPosition, listId),
};
@ -34,7 +35,7 @@ export function* createCard(listId, data) {
return;
}
yield put(actions.createCard.success(localId, card));
if (data.open) {
if (open) {
yield call(goToCard, card.id);
}
}