Total-RP / Total-RP-3

The best roleplaying add-on for World of Warcraft.
http://curse.totalrp.com
Apache License 2.0
33 stars 19 forks source link

Fix KuiNameplates error when customization module is disabled #924

Closed Solanya closed 1 week ago

Solanya commented 1 week ago

A long time ago (https://github.com/Total-RP/Total-RP-3/pull/884), changes were made to the KuiNameplates module to register some functions before the Kui initialization process.

Unfortunately, the function in charge of determining whether the nameplate should be customized tries to access a table that is not initialized if the module is disabled, causing it to completely break KuiNameplates as a result (on top of perma-erroring).

I've added a check on whether the table is nil. Alternative solution would be to create the table in OnLoad, not sure if that'd be a better solve. 🤷