fix: translation

This commit is contained in:
abdou6666 2024-12-30 15:34:04 +01:00
parent fa8a433a64
commit 8707b861b4
2 changed files with 7 additions and 2 deletions

View File

@ -141,7 +141,9 @@ describe('TranslationController', () => {
translationController = module.get<TranslationController>(
TranslationController,
);
translation = await translationService.findOne({ str: 'Welcome' });
translation = (await translationService.findOne({
str: 'Welcome',
})) as Translation;
});
afterEach(jest.clearAllMocks);
@ -164,7 +166,9 @@ describe('TranslationController', () => {
expect(translationService.findOne).toHaveBeenCalledWith(translation.id);
expect(result).toEqualPayload(
translationFixtures.find(({ str }) => str === translation.str),
translationFixtures.find(
({ str }) => str === translation.str,
) as Translation,
);
});
});

View File

@ -100,6 +100,7 @@ export class TranslationService extends BaseService<Translation> {
}
// Add fallback messages
if (
block.options &&
'fallback' in block.options &&
block.options.fallback &&
'message' in block.options.fallback &&