kandashi/Active-Auras

v10 Errors Transferring Effect to Template

Opened this issue · 1 comments

Describe the bug
Error transferring effect to template. This works in v9, but fails in v10:
Uncaught (in promise) TypeError: undefined. Cannot read properties of undefined (reading 'tag')
[Detected 1 package: itemacro]
at eval (eval at Item._executeScript (helper.js:82:18), :6:12)
at Macro.eval (eval at Item._executeScript (helper.js:82:18), :9:9)
at Item._executeScript (helper.js:88:12)
at Item.executeMacro (helper.js:60:23)
at HTMLDivElement. (helper.js:170:20)
at HTMLDivElement.dispatch (jquery.min.js:2:43064)
at y.handle (jquery.min.js:2:41048)

'tag' seems like it may be related to tagger (installed, enabled, and latest version).

Module requirements met: Advanced Macros, Midi-QOL, DAE, Item Macro, etc.

To Reproduce
Steps to reproduce the behavior:

  1. Configure aura
  2. Configure to transfer to template (code below,, from the AA compendium)

if (!game.modules.get("advanced-macros")?.active) { ui.notifications.error("Advanced Macros is not enabled"); return }
if(args[0].tag === "OnUse"){
AAhelpers.applyTemplate(args)
}

Expected behavior
Aura effect on template.

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

Environment:

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Foundry Version [e.g. 0.8.8]
  • Module Version [e.g 0.1.42]
  • All Modules Disabled: Yes/No
  • Module List if no:

Additional context
Add any other context about the problem here.

This definitely works, and works for my Spike Growth macro attached to a template. Worth noting I had difficulties getting it working on anything other than a "preActiveEffects" on use macro.

If it still doesn't work, can your provide a copy of the item, and try with just the prerequisite modules installed?