ChatButtons: Fix Crashing

This commit is contained in:
thororen1234 2025-11-12 17:45:58 -05:00
parent edd0d84759
commit 9d3db2ae09
No known key found for this signature in database

View file

@ -80,10 +80,9 @@ export type ChatBarButtonFactory = (props: ChatBarProps & { isMainChat: boolean;
const buttonFactories = new Map<string, ChatBarButtonFactory>();
const logger = new Logger("ChatButtons");
export function _injectButtons(buttons: ReactNode[], order: Record<string, number | null>, props: ChatBarProps) {
export function _injectButtons(buttons: ReactNode[], props: ChatBarProps) {
if (props.disabled) return;
for (const [key, Button] of buttonFactories) {
buttons.unshift(
<ErrorBoundary noop key={key} onError={e => logger.error(`Failed to render ${key}`, e.error)}>