mclemente / fvtt-condition-lab-triggler

Condition Lab & Triggler module for Foundry Virtual Tabletop
GNU General Public License v3.0
6 stars 4 forks source link

[Compatibility] Error in log when loaded with Kanka-Foundry #40

Closed strongpauly closed 7 months ago

strongpauly commented 7 months ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Install this module, libWrapper and Kanka-Foundry
  2. Enable all modules and reload
  3. See error:
    
    LibWrapperPackageError: lib-wrapper. Error detected in module Condition Lab & Triggler.

This is not a libWrapper bug.

Find information about this module here: https://github.com/mclemente/fvtt-condition-lab-triggler Report this issue here: https://github.com/mclemente/fvtt-condition-lab-triggler/issues

== Technical Details: Detected by libWrapper. Package ID= condition-lab-triggler Error= A wrapper for 'Token.prototype._refreshEffects' (ID=202) has already been registered by module condition-lab-triggler.

[Detected 3 packages: lib-wrapper, condition-lab-triggler, kanka-foundry] at šŸŽregister [as register] (libWrapper-api.js:542:10) at Object.fn (condition-lab-triggler.js:83:14) at #call (foundry.js:730:20) at Hooks.callAll (foundry.js:687:17) at Localization.initialize (foundry.js:7378:11) at async setup (ready.ts:10:9)



**Expected behavior**
Error should not occur

**Environment Info (please complete the following information):**
 - Foundry Version: v11 315
 - Game System / Version: dnd5e 3.0.4
 - CLT Version: 1.5.4
 - Browser: Electron app/Chrome
 - OS: Mac OSX

**Additional context**
I've tracked this down to the fact that when Kanka loads it changes the language and re-runs the `i18nInit` hook, which arguably it shouldn't be doing.  However, I'm unsure as to why CLT relies on this hook to do its initialization.