Aedif / TokenVariants

GNU General Public License v3.0
17 stars 12 forks source link

Issues on Foundry v9 #36

Closed DarkByteZero closed 2 years ago

DarkByteZero commented 2 years ago

Describe the bug

Token Image Randomizer won't work and produces console Errors. Changing Token Variant via Token Hud Works, but also produces console Errors.

On Actor Canvas Drop with Randomizer enabled: token-variants.mjs:957 Uncaught (in promise) TypeError: token.getFlag is not a function [Detected 1 package: token-variants] at updateTokenImage (token-variants.mjs:957) at callback (token-variants.mjs:448) at doRandomSearch (token-variants.mjs:875)

On Token Hud Variant Change: display.min.js:8 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'scale') [Detected 1 package: token-variants] at r.get (display.min.js:8) at Token5e.refresh (foundry.js:37711) at Token5e._onUpdate (foundry.js:38492) at TokenDocument5e._onUpdate (foundry.js:9745) at TokenDocument5e._onUpdate (foundry.js:18896) at ClientDatabaseBackend.callback (foundry.js:10203) at foundry.js:10186 at Array.map () at ClientDatabaseBackend._handleUpdateEmbeddedDocuments (foundry.js:10186) at ClientDatabaseBackend._updateEmbeddedDocuments (foundry.js:10068) at async Function.updateDocuments (document.mjs:373) at async TokenDocument5e.update (document.mjs:456) at async updateTokenImage (token-variants.mjs:997)

Steps to reproduce the behavior:

  1. Drag Actor on Game Canvas with randomizer enabled
  2. Actor will be added to Canvas but without randomized Token Art
  3. Open Token Variant Art Hud on Token
  4. Select a different Token Art
  5. Token Art changes but with Error

Expected behavior

Information

Foundry Virtual Tabletop: Version 9, 9.238 Game System: dnd5e, 1.5.6 Active Modules: libWrapper, Token Variant Art

Aedif commented 2 years ago

Hello,

The module has now been tested on v9 as of release 1.20.2 without any errors.

Feel free to comment here if you find any more issues.