DestinyItemManager / DIM

Destiny Item Manager
https://destinyitemmanager.com
MIT License
2.06k stars 643 forks source link

Error in mod picker #6485

Closed bhollis closed 3 years ago

bhollis commented 3 years ago

https://twitter.com/dennisk04296487/status/1357522536523837440

ryan-rushton commented 3 years ago

So digging into the item definitions on https://data.destinysets.com the only item definitions that dont have itemTypeDisplayName are the classified ones. To have a look use the following query in the console

window.$DestinyInventoryItemDefinition.filter(i => i.itemTypeDisplayName === undefined);

That being the case I am going to make that part of the filter. I could be persuaded to have a falsey check on on the name and have "Other" in the event we get some mods that come through on the API that have this missing.

Side note, being as though that can be undefined, should we update the bungie generated API to possibly be undefined?

Edit: The following is probably a more accurate check but gives the same results

window.$DestinyInventoryItemDefinition.filter(i => typeof i.itemTypeDisplayName !== 'string');
nev-r commented 3 years ago

Side note, being as though that can be undefined, should we update the bungie generated API to possibly be undefined?

classified items defy all advertised definition structure, so really any work around item defs needs to filter out classified stuff. typing ItemDefinition truly accurately would mean every operation is full of property existence checks