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

Multiple Spells in magic Items breaking magic items page #44

Closed spidermoiz closed 8 months ago

spidermoiz commented 8 months ago

Module Version: v1.4.6

Describe the Bug Item is a staff, that has multiple spells and charges used to cast them, currently the item is working, it allows for spells to be cast, however the Magic tab is compeltely blank, and the charges do not get restored daily at dawn automatically anymore. I created a new item and then the magic item page was there, i tried adding spells, but it will break when i add more than 2 spells and then bcome blank again. I see this error in console

Uncaught (in promise) ReferenceError: MagicItem is not defined at sortByLevel (magic-item-helpers.js:64:34) at Array.sort () at _a.sort (MagicItem.js:54:33) at _MagicItemTab.render (magicItemtab.js:88:20) at _MagicItemTab.init (magicItemtab.js:69:10) at MagicItemTab.bind (magicItemtab.js:17:11) at Object.fn (module.js:72:16) at #call (foundry.js:730:20) at Hooks.callAll (foundry.js:687:17) at _Tidy5eItemSheet._render (foundry.js:5855:13) at async _Tidy5eItemSheet._render (foundry.js:6532:5)

Screenshots image

Browser:

**Foundry Version: 11.315

**Game System: DND 2.4.1

PwQt commented 8 months ago

Should be fixed in 1.4.7