Skip to content

Commit

Permalink
Merge pull request #10851 from DestinyItemManager/invalid-loadout-ids
Browse files Browse the repository at this point in the history
Ignore invalid item IDs more broadly
  • Loading branch information
bhollis authored Dec 18, 2024
2 parents 921c23b + 8c3c774 commit 40b8911
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/app/loadout/loadout-type-converters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,7 @@ function convertDimLoadoutItemToLoadoutItem(item: DimLoadoutItem): LoadoutItem {
const result: LoadoutItem = {
hash: item.hash,
};
if (
item.id &&
item.id !== '0' &&
// Vendor items have an invalid item ID
!item.id.includes('-')
) {
if (item.id && item.id !== '0' && /^\d{1,32}$/.test(item.id)) {
result.id = item.id;
}
if (item.amount > 1) {
Expand Down

0 comments on commit 40b8911

Please sign in to comment.