Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Cannot read property 'token' of undefined" when using an ability from a character that is not in the encounter tracker #49

Open
Almarane opened this issue Feb 18, 2021 · 0 comments

Comments

@Almarane
Copy link

Almarane commented Feb 18, 2021

I use the Pathfinder 1 system.

Steps to reproduce :

  • Create a monster with any attack
  • Put the monster on the scene
  • Double-click on the monster's token to open its sheet
  • Use one of its attacks
    OR
  • Create a monster with any attack
  • Put the monster on the scene
  • Right click on the monster's token
  • Use one of its attacks from its quickbar under the token

Do NOT add the monster to the encounter tracker.

=> On the console, this error is displayed :

Uncaught (in promise) TypeError: Cannot read property 'token' of undefined
    at turnmarker.js:56
    at Function._call (foundry.js:2496)
    at Function.call (foundry.js:2481)
    at foundry.js:29991
    at Array.reduce (<anonymous>)
    at Scene.updateEmbeddedEntity (foundry.js:29978)
    at Token.update (foundry.js:11475)
    at ActorPF.updateEmbeddedEntity (foundry.js:31318)
    at ActorPF.PatchCore.ActorTokenHelpers.updateEmbeddedEntity (patch-core.js:199)
    at ItemPF.update (foundry.js:32513)

This error will also break the attack's calculation if you use the dialogue that appears when you use the attack to change some values.

Expected behaviour : I should be able to use a monster's attack even if it is not in the encounter tracker without breaking my roll's calculation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant