From 5903041eb136dddefdc81f5855baf0d8ea4baf17 Mon Sep 17 00:00:00 2001 From: Evie Gauthier Date: Mon, 2 Mar 2026 19:56:31 -0500 Subject: [PATCH] Fix es-lint complains --- src/types/matrix-sdk.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/types/matrix-sdk.ts b/src/types/matrix-sdk.ts index f5063275..f6c5c7db 100644 --- a/src/types/matrix-sdk.ts +++ b/src/types/matrix-sdk.ts @@ -15,12 +15,12 @@ export * from 'matrix-js-sdk/lib/content-repo'; export * from 'matrix-js-sdk/lib/sync'; export * from 'matrix-js-sdk/lib/sync-accumulator'; -const amendClientOpts = (opts: ICreateClientOpts): ICreateClientOpts => { - opts.store ??= new MemoryStore({ localStorage: globalThis.localStorage }); - opts.scheduler ??= new MatrixScheduler(); - opts.cryptoStore ??= new MemoryCryptoStore(); - return opts; -}; +const amendClientOpts = (opts: ICreateClientOpts): ICreateClientOpts => ({ + ...opts, + store: opts.store ?? new MemoryStore({ localStorage: globalThis.localStorage }), + scheduler: opts.scheduler ?? new MatrixScheduler(), + cryptoStore: opts.cryptoStore ?? new MemoryCryptoStore(), +}); // Intentionally avoid importing createClient from matrix-js-sdk/lib/matrix to sidestep // a production bundling init-order bug involving RoomWidgetClient re-exports.