Fix setting deleted timeslotitem as played. Fixes #192
This commit is contained in:
parent
ed8e27547f
commit
8411146482
1 changed files with 5 additions and 1 deletions
|
@ -192,7 +192,11 @@ const showplan = createSlice({
|
||||||
const idx = state.plan!.findIndex(
|
const idx = state.plan!.findIndex(
|
||||||
(x) => itemId(x) === action.payload.itemId
|
(x) => itemId(x) === action.payload.itemId
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (idx > -1) {
|
||||||
state.plan![idx].played = action.payload.played;
|
state.plan![idx].played = action.payload.played;
|
||||||
|
}
|
||||||
|
// If we don't find an index, it's because the item has been deleted, just ignore.
|
||||||
},
|
},
|
||||||
replaceGhost(
|
replaceGhost(
|
||||||
state,
|
state,
|
||||||
|
|
Loading…
Reference in a new issue