jopeek / fvtt-loot-sheet-npc-5e

FVTT - Loot Sheet NPC 5E
MIT License
44 stars 86 forks source link

Cannot buy inventory #393

Closed iksior closed 1 year ago

iksior commented 1 year ago

Describe the bug After clicking on buy icon from account with observer account nothing is happenning and error is being displayed in console To Reproduce Steps to reproduce the behavior:

  1. Create new NPC
  2. Change sheet to Loot sheet npc
  3. Add observer permission for a player
  4. add item from inventory to npc inventory
  5. relog to player account
  6. click on npc token
  7. after clicking on BUY icon nothing is happening but error is being displayed in console Uncaught TypeError: undefined. Cannot read properties of null (reading '_id') [Detected 1 package: lootsheet-simple] at LootSheet5eNPC._buyItem (lootsheet-simple.js:626:30) at HTMLAnchorElement.<anonymous> (lootsheet-simple.js:307:47) at HTMLAnchorElement.dispatch (jquery.min.js:2:43064) at y.handle (jquery.min.js:2:41048)

Expected behavior Item should be added to player inv

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

jopeek commented 1 year ago

Confirmed. Will release a fix asap. On Mar 13, 2023 at 8:17 AM -0700, iksior @.***>, wrote:

Describe the bug After clicking on buy icon from account with observer account nothing is happenning and error is being displayed in console To Reproduce Steps to reproduce the behavior:

  1. Create new NPC
  2. Change sheet to Loot sheet npc
  3. Add observer permission for a player
  4. add item from inventory to npc inventory
  5. relog to player account
  6. click on npc token
  7. after clicking on BUY icon nothing is happening but error is being displayed in console Uncaught TypeError: undefined. Cannot read properties of null (reading '_id') [Detected 1 package: lootsheet-simple] at LootSheet5eNPC._buyItem (lootsheet-simple.js:626:30) at HTMLAnchorElement. (lootsheet-simple.js:307:47) at HTMLAnchorElement.dispatch (jquery.min.js:2:43064) at y.handle (jquery.min.js:2:41048)

Expected behavior Item should be added to player inv Screenshots If applicable, add screenshots to help explain your problem. Desktop (please complete the following information):

• OS: MacOS • Browser Chrome • Version Version 110.0.5481.177 (Official Build) (arm64)

Additional context Add any other context about the problem here. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

jopeek commented 1 year ago

Fixed in 5.04.

iksior commented 1 year ago

Retested:

Should I create a new issue? Current version: 5.04

Error still exists. Same repro lootsheet-simple.js:626 Uncaught TypeError: undefined. Cannot read properties of null (reading '_id') [Detected 1 package: lootsheet-simple] at LootSheet5eNPC._buyItem (lootsheet-simple.js:626:30) at HTMLAnchorElement.<anonymous> (lootsheet-simple.js:307:47) at HTMLAnchorElement.dispatch (jquery.min.js:2:43064) at y.handle (jquery.min.js:2:41048)