Skip to content

Commit

Permalink
Don't require translation message on decode
Browse files Browse the repository at this point in the history
Co-Authored-By: Gregor MacLennan <[email protected]>
  • Loading branch information
EvanHahn and gmaclennan committed Sep 16, 2024
1 parent 90659dd commit 2ecd8a8
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/lib/decode-conversions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,22 +288,19 @@ export const convertTranslation: ConvertFunction<'translation'> = (
propertyRef,
languageCode,
regionCode,
message: translationMessage,
...rest
} = message
const jsonSchemaCommon = convertCommon(common, versionObj)
ensure(message.docRef, 'translation', 'docRef')
ensure(message.docRef.versionId, 'translation.docRef', 'versionId')
ensure(propertyRef, 'translation', 'propertyRef')
ensure(languageCode, 'translation', 'languageCode')
ensure(translationMessage, 'translation', 'translationMessage')
return {
...jsonSchemaCommon,
...rest,
propertyRef,
languageCode,
regionCode,
message: translationMessage,
docRef: {
docId: message.docRef.docId.toString('hex'),
versionId: getVersionId(message.docRef.versionId),
Expand Down

0 comments on commit 2ecd8a8

Please sign in to comment.