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

Potential problems found #5

Open
Strencher opened this issue Dec 18, 2022 · 1 comment
Open

Potential problems found #5

Strencher opened this issue Dec 18, 2022 · 1 comment

Comments

@Strencher
Copy link

First of all, this Switch component should be cached so it doesn't do a webpack search every time you open the settings panel.

return BdApi.React.createElement(BdApi.Webpack.getModule(m => m?.toString?.()?.includes?.('helpdeskArticleId')), { onChange: onChangeFunc, note, value, children });

Secondary, you should add better error handling because components like Switch, Slider and so on can change at any time and cause your settings panel to crash.

@hackermare
Copy link
Owner

I fixed the first problem. I'm not sure what you want me to do with the second one though. Just not show anything on the settings panel if the components are missing? I think the error message would be more useful...

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