Fix adding an item to an empty channel (fixes #104)

This commit is contained in:
Marks Polakovs 2020-05-03 21:04:53 +02:00
parent fa0e14f729
commit d7f06ac4fb

View file

@ -53,9 +53,7 @@ function Channel({ id, data }: { id: number; data: PlanItem[] }) {
ref={provided.innerRef}
{...provided.droppableProps}
>
{typeof data[id] === "undefined"
? null
: data
{data
.filter((x) => x.channel === id)
.sort((a, b) => a.weight - b.weight)
.map((x, index) => (