mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-04 05:56:09 +00:00
fix: default props in components (#202)
This commit is contained in:
parent
71763d11d9
commit
9a942e8674
@ -173,6 +173,7 @@ export class ComponentHandler extends BaseHandler {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!(component instanceof ModalCommand || component instanceof ComponentCommand)) continue;
|
if (!(component instanceof ModalCommand || component instanceof ComponentCommand)) continue;
|
||||||
|
component.props ??= this.client.options.commands?.defaults?.props ?? {};
|
||||||
if (component instanceof ModalCommand) {
|
if (component instanceof ModalCommand) {
|
||||||
component.onInternalError ??= this.client.options?.modals?.defaults?.onInternalError;
|
component.onInternalError ??= this.client.options?.modals?.defaults?.onInternalError;
|
||||||
component.onMiddlewaresError ??= this.client.options?.modals?.defaults?.onMiddlewaresError;
|
component.onMiddlewaresError ??= this.client.options?.modals?.defaults?.onMiddlewaresError;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user