Foundry-Workshop / Item-Macro

Store macros in your items, execute them from your character sheet or from your favorite automation module!
MIT License
1 stars 4 forks source link

Unable to execute item macros when canvas is disabled #3

Closed kgar closed 10 months ago

kgar commented 10 months ago

When I have the canvas disabled in settings, I get an error when executing an item macro.

image

helper.js:74 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'get')
    at Item._executeScript (helper.js:74:35)
    at Item.executeMacro (helper.js:62:23)
    at ItemMacroConfig._onExecute (ItemMacroConfig.js:43:10)

The setting:

image

Here is where it dies in the code:

image

When I look at the canvas object in devtools, it doesn't have a tokens prop:

image

I confirmed that it does work when I enable the canvas.