PwQt / magic-items-2

This module for Foundry VTT and specific for the DnD5e system, adds the ability to create magical items with spells or feats that belong to the item itself, such as staffs or magic wands, which will be automatically inherited from the character who owns the item.
https://github.com/PwQt/magic-items-2
MIT License
18 stars 7 forks source link

[BUG] - Cannot read properties of null (reading 'parent') #65

Closed rafacrudi closed 7 months ago

rafacrudi commented 7 months ago

Foundry Version: v11.315 System Version: D&D 5e v3.0.2 Module Version: v1.6.1

Before open any issue

1) I don't see a "Enable debugging" option to be enabled. 2) Click F12 go to the console tab 3) make the test you want and replicate the error 4) Go to the tab console open on point 2) and just right click and click 'Save as' and 'Save' or send a screenshot of the exception on the console. 5) Attach the text file on the github issue with all the logs related tot he module, or send a screenshot of the messages on the console.

This is what the log shows: foundry.js:68326 Cannot read properties of null (reading 'parent') [Detected 1 package: system:dnd5e] fetch @ foundry.js:68326

Describe the bug A clear and concise description of what the bug is. When trying to cast a spell on multiple targets, got the above message on the console: "Cannot read properties of null (reading 'parent') [Detected 1 package: system:dnd5e]"

To Reproduce Steps to reproduce the behavior:

  1. Marked an item as "is magic item"
  2. Added spell "Bless" at 3rd level (5 targets)
  3. Spell shows in Character sheet.
  4. Clicked on the spell
  5. Selected the tokens
  6. In Spell card, clicked "Apply to selected tokens"
  7. Effect didn't apply, saw the error message.

Expected behavior Well, spell should be applied to the target without the error. The character is a Claric with the spell on his list, I can cast it on the same targets, no problem.

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

Browser:

PwQt commented 7 months ago

Duplicate of #63