Z3nner / lancer-weapon-fx

Visual and Sound Effects for use primarily with the Lancer TTRPG system on Foundry.
5 stars 6 forks source link

Fix crash when opening the effects manager under v12 #64

Closed cirrahn closed 1 month ago

cirrahn commented 1 month ago

Original bug report:

image

Things visible in this log:

When I tried to reproduce this I was unable to get the same crash. The log suggests the crash was here (in MEJ code):

CONST.WORLD_DOCUMENT_TYPES.includes(...)

with CONST.WORLD_DOCUMENT_TYPES being undefined. This does not make any sense/is not a LWFX issue, as CONST.WORLD_DOCUMENT_TYPES is set by Foundry/the game system.

However I did find a bug where a sync method in v11 is now async in v12, which caused a crash, so that has been fixed. Some additional speculative fixes to link generation to harden against other modules too.

Z3nner commented 1 month ago

I wish I had questioned the user a little more. I even wondered if they were maybe trying to use V12, but don't have the eyes you have to spot it from that message.

Considering Lancer doesn't yet support V12, I wonder if this would be wasted effort? I'll merge if you say we'll need it for future support. Just lemme know.

cirrahn commented 1 month ago

These changes will be needed for future support, yes! It is "backwards" compatible with v11, so should be safe to merge now.

The change affects the rendering of the actor name in a folder header. Here it is working under my v11:

image