diff --git a/src/renderer/components/hotbar/hotbar-menu.tsx b/src/renderer/components/hotbar/hotbar-menu.tsx index 588ade7cd5..a9629b8934 100644 --- a/src/renderer/components/hotbar/hotbar-menu.tsx +++ b/src/renderer/components/hotbar/hotbar-menu.tsx @@ -57,6 +57,7 @@ export class HotbarMenu extends React.Component { renderGrid() { return this.hotbar.items.map((item, index) => { const entity = this.getEntity(item); + const isActive = !entity ? false : this.isActive(entity); return ( @@ -92,7 +93,7 @@ export class HotbarMenu extends React.Component { key={index} index={index} entity={entity} - isActive={this.isActive(entity)} + isActive={isActive} onClick={() => entity.onRun(catalogEntityRunContext)} className={cssNames({ isDragging: snapshot.isDragging })} />