mclemente / fvtt-module-polyglot

Talk to others using a language you can speak and scrambles text you can't understand.
MIT License
40 stars 47 forks source link

Unknown id error when player owns more than one actor/token (suggested fix) #338

Closed marvin9257 closed 7 months ago

marvin9257 commented 7 months ago

Describe the bug When player controls more than one actor, this check on line 27 of hooks produce unknown id error. "if (game.user.isGM || owner.id === userId) {" Thank you. To Reproduce Steps to reproduce the behavior:

  1. Give player ownership of more than one actor
  2. drag and drop actors onto canvas
  3. Run as player (works OK as GM)
  4. Update actor somehow
  5. See error

Expected behavior No error Use null check on owner.id, make line 27 in hooks.js "if (game.user.isGM || owner?.id === userId) {"

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

Screenshot 2023-11-18 at 8 07 18 AM

Additional context Add any other context about the problem here.