1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix type error

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-12-13 08:16:45 -05:00
parent ffcc725123
commit 0fba1dab47

View File

@ -89,7 +89,7 @@ class NonInjectedHotbarMenu extends React.Component<Dependencies & HotbarMenuPro
hotbar.addToHotbar(entity, index);
};
getMoveAwayDirection(entityId: string | undefined, cellIndex: number) {
getMoveAwayDirection(entityId: string | undefined | null, cellIndex: number) {
if (!entityId) {
return "animateDown";
}
@ -110,10 +110,13 @@ class NonInjectedHotbarMenu extends React.Component<Dependencies & HotbarMenuPro
index={index}
key={entity ? entity.getId() : `cell${index}`}
innerRef={provided.innerRef}
className={cssNames({
isDraggingOver: snapshot.isDraggingOver,
isDraggingOwner: snapshot.draggingOverWith == entity?.getId(),
}, this.getMoveAwayDirection(snapshot.draggingOverWith, index))}
className={cssNames(
{
isDraggingOver: snapshot.isDraggingOver,
isDraggingOwner: snapshot.draggingOverWith == entity?.getId(),
},
this.getMoveAwayDirection(snapshot.draggingOverWith, index),
)}
{...provided.droppableProps}
>
{item && (