mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
Fixed: Import series failing to add items to process
Closes #1380 (cherry picked from commit 97ec1847541ba2a73d25eedbd3c97aa6f2f7e4e0)
This commit is contained in:
parent
bc5f78b0c8
commit
65caac3380
1 changed files with 3 additions and 2 deletions
|
@ -72,8 +72,9 @@ export default function createHandleActions(handlers, defaultState, section) {
|
|||
if (section === baseSection) {
|
||||
const newState = getSectionState(state, payloadSection);
|
||||
const items = newState.items;
|
||||
const itemMap = newState.itemMap ?? {};
|
||||
|
||||
const index = payload.id in newState.itemMap ? newState.itemMap[payload.id] : -1;
|
||||
const index = payload.id in itemMap ? itemMap[payload.id] : -1;
|
||||
|
||||
newState.items = [...items];
|
||||
|
||||
|
@ -92,7 +93,7 @@ export default function createHandleActions(handlers, defaultState, section) {
|
|||
} else if (!updateOnly) {
|
||||
const newIndex = newState.items.push({ ...otherProps }) - 1;
|
||||
|
||||
newState.itemMap = { ...newState.itemMap };
|
||||
newState.itemMap = { ...itemMap };
|
||||
newState.itemMap[payload.id] = newIndex;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue