Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wall Height doesn't work when libwrapper isn't enabled #17

Open
manuelVo opened this issue Jun 16, 2021 · 1 comment
Open

Wall Height doesn't work when libwrapper isn't enabled #17

manuelVo opened this issue Jun 16, 2021 · 1 comment

Comments

@manuelVo
Copy link

In Foundry 0.8.6, Wall Height 3.5.3.5 doesn't work if the libwrapper module isn't enabled, even though a libwrapper shim is included in Wall Height.

@ruipin
Copy link

ruipin commented Jun 17, 2021

This is because import {libWrapper} from '../shim.js'; is missing from the file patches.js. Instead, it looks like this line was added to wall-height.js, which does not use it.

As such, if libWrapper isn't active, the shim won't be used. Instead the script will search the global scope for libWrapper, and because it is undefined registering wrappers simply fails.

Note that in ESModules, files do not share scope. As such, the imported libWrapper symbol in wall-height.js is not visible from patches.js. Symbols need to be imported in every single file they are used in.

I recommend module devs always test modules that use the shim at least once before any release with libWrapper disabled, otherwise this kind of mistake can happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants