Fix "repair failed"

In a showplan with nothing in column 0 or 1 that is corrupt (has non-consecutive item weights), the repair code would generate invalid operations, because it used the index of the channel it was repairing rather than the correct channel number.
This commit is contained in:
Marks Polakovs 2021-04-28 08:57:01 +01:00
parent fecbfc79c3
commit c391ecc7fa

View file

@ -551,8 +551,8 @@ export const getShowplan = (timeslotId: number): AppThunk => async (
ops.push({
op: "MoveItem",
timeslotitemid: item.timeslotitemid,
oldchannel: colIndex,
channel: colIndex,
oldchannel: item.channel,
channel: item.channel,
oldweight: item.weight,
weight: itemIndex,
});