Update api/src/chat/services/block.service.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Med Marrouchi 2025-06-12 11:59:02 +01:00 committed by Mohamed Marrouchi
parent b9acf9d0c7
commit bcacdec406

View File

@ -784,10 +784,7 @@ export class BlockService extends BaseService<
* @returns The fallback options for the block, or default options if not specified. * @returns The fallback options for the block, or default options if not specified.
*/ */
getFallbackOptions<T extends BlockStub>(block: T): FallbackOptions { getFallbackOptions<T extends BlockStub>(block: T): FallbackOptions {
const fallbackOptions: FallbackOptions = block.options?.fallback return block.options?.fallback ?? getDefaultFallbackOptions();
? block.options.fallback
: getDefaultFallbackOptions();
return fallbackOptions;
} }
/** /**