FrankerFaceZ / Add-Ons

Add-Ons are additional modules for FrankerFaceZ that provide new behaviors and ways to customize Twitch.
66 stars 58 forks source link

Twir 1.1.0 #214

Closed crashmax-dev closed 3 months ago

crashmax-dev commented 4 months ago

Add badges api, refactor.

SirStendec commented 3 months ago

Sorry for the delay.

crashmax-dev commented 3 months ago

@SirStendec thanks!

Can you help? I got an error on the production, while in dev everything works.

image

https://github.com/FrankerFaceZ/Add-Ons/blob/9d62fc2adae1e5f28ab6c461b1788a055de12fe8/src/twir/settings.js#L35-L37

SirStendec commented 3 months ago

So, looking at this, something about the code minifier is mangling the names of your classes, which causes FFZ to inject them with unexpected variable names if you haven't manually specified which variable name to use.

I believe this behavior is triggered because you have multiple classes named Badges, but ultimately that doesn't matter. The easiest fix would be to just change your inject(thing) calls to injectAs(name, thing), I believe.