caewok / fvtt-walled-templates

Foundry VTT templates that interact with walls
MIT License
9 stars 4 forks source link

Walled Templates 0.6.3 error when the Active Effect being deleted has no origin. #34

Closed thatlonelybugbear closed 1 year ago

thatlonelybugbear commented 1 year ago
 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'includes')  ActiveEffect.js:19

There are effects that do not have an origin (think DFreds CEs manually added), so the line in ActiveEffect.js:19 will produce the above error.

Some optional chaining should be enough.

edit: though now that I think about it more, I might need to check the exact moment that this error is triggered 🤔

edit2: yeah it is produced when you delete an DFreds CE that you have manually added from the DFreds CE app.

caewok commented 1 year ago

Yes, it did not occur to me that you could have an active effect without an origin!

caewok commented 1 year ago

Should be fixed in v0.6.4. I did not immediately see any other spots that made that assumption, so hopefully that is the only place it comes up.