Skip to content

Commit cdf85bc

Browse files
committed
refactor: provide default messageComposer config param
1 parent 0b1b773 commit cdf85bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/messageComposer/messageComposer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ export class MessageComposer {
7575
threadId: string | null;
7676
private unsubscribeFunctions: Set<() => void> = new Set();
7777

78-
constructor({ channel, composition, config = {}, threadId }: MessageComposerOptions) {
78+
constructor({ channel, composition, config, threadId }: MessageComposerOptions) {
7979
this.channel = channel;
8080
this.threadId = threadId ?? null;
8181
// todo: solve ts-ignore
82-
this.config = mergeWith(DEFAULT_COMPOSER_CONFIG, config);
82+
this.config = mergeWith(DEFAULT_COMPOSER_CONFIG, config ?? {});
8383
const message =
8484
composition && (isMessageDraft(composition) ? composition.message : composition);
8585
this.attachmentManager = new AttachmentManager({ channel, message });

0 commit comments

Comments
 (0)