Skip to content

decision(firestore-translate-text): null input routes to translateSingle instead of throwing #3142

Description

@cabljac

The extension checks typeof input === "object", so a null input routes into translateMultiple and throws in Object.entries(null) (functions/src/translate/translateMultiple.ts:35). The kit adds && input !== null (kits/firestore-translate-text/src/translate/translateDocument.ts:44), which routes null to translateSingle instead. Only reachable on the update path, since create is guarded by if (input).

#3109 (#3106) added a test that pins the kit's routing (tests/translate-document.test.ts:116), so the divergence is now deliberate in code but not yet ruled.

Decide one of:

Parity ledger: #2974, firestore-translate-text §4a.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions