qb-inventory
qb-inventory copied to clipboard
fix: amount is nil in `GetTotalWeight` + misc lint issues
Description
Upon running /giveitem 1 radio 1
, you'll run into the following error.
(First print is raw item json, second print is weight & amount)
Perhaps this should be looked into more deeply, as the amount value should be defined here. Aswell as the fact that this error might be happening at other places
Perhaps, this is caused by the radio being a unique item?
Checklist
- [x] I have personally loaded this code into an updated qbcore project and checked all of its functionality.
- [x] My code fits the style guidelines.
- [x] My PR fits the contribution guidelines.