Skip to content

Commit

Permalink
fix vendor source display with no NPC ID
Browse files Browse the repository at this point in the history
  • Loading branch information
kayla-glick committed Aug 5, 2024
1 parent 9b06e65 commit 9b9d724
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions ui/core/components/gear_picker/item_list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -709,13 +709,24 @@ export default class ItemList<T extends ItemListType> {
);
} else if (source.source.oneofKind == 'soldBy') {
const src = source.source.soldBy;
return makeAnchor(
ActionId.makeNpcUrl(src.npcId),
<div className="d-flex">
{this.getVendorSourceIcon()}
<span>{src.npcName}</span>
</div>,
);

if (src.npcId) {
return makeAnchor(
ActionId.makeNpcUrl(src.npcId),
<div className="d-flex">
{this.getVendorSourceIcon()}
<span>{src.npcName}</span>
</div>,
);
} else {
return makeAnchor(
`${ActionId.makeItemUrl(item.id)}#sold-by`,
<div className="d-flex">
{this.getVendorSourceIcon()}
<span>Vendor</span>
</div>,
);
}
}
return <></>;
}
Expand Down

0 comments on commit 9b9d724

Please sign in to comment.