death-save / maestro

Audio-focused QOL module for Foundry Virtual Tabletop
GNU General Public License v3.0
18 stars 18 forks source link

When encounter ends errors are thrown into the console log #161

Open galaara98 opened 2 years ago

galaara98 commented 2 years ago

Describe the bug an encounter that has Hype Tracks is ended by the GM pressing "End Encounter" produces a error (twice) in the console:

TypeError: Cannot read properties of undefined (reading 'getFlag') [Detected 1 package: maestro] at _addPlaylistLoopToggle (misc.js:143) at Module._onRenderPlaylistDirectory (misc.js:6) at maestro.js:185 at Function._call (foundry.js:294) at Function.call (foundry.js:279) at PlaylistDirectory._render (foundry.js:3086) at async PlaylistDirectory._render (foundry.js:46675)

To Reproduce

  1. Setup an encounter, press start encounter (you can see the error right at this moment also)
  2. have a battle 😄
  3. End the encounter
  4. you can see the error in the console logs Note: all tracks are left open, but paused

Expected behavior no error in the logs, Combat and Hype tracks are removed from the current playing list, and Ambient scene track is un-paused if exists in currently playing, started if doesn't or quiet if not Ambient Scene track is set

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

Foundry Setup (please complete the following information): OS: Client: Windows, Server Ubuntu, Node 16.3.1 Browser Chromium based Edge 96.0.1054.62 Foundry Version: Stable 9.238 System Version: PF2e 3.1.3.9639 Maestro Version: 0.8.0 No other modules

Additional context Add any other context about the problem here.