Skip to content

fallbackLng: false seems to not be handled #677

Description

@immortal-tofu

Describe the bug
If you use react-i18next (for me, with hooks, but I'm not sure it's related), if you init i18next with fallbackLng: false and an unknown lng, you'll encounter an error.

Cannot read property '0' of undefined in node_modules/react-i18next/dist/es/hooks/useTranslation.js?:52:52

Occurs in react-i18next version
9.02

To Reproduce

  • Initialize a i18next with fallbackLng: false and set language to an unknown value (for example eo)

Expected behaviour
Working :)

OS (please complete the following information):
Happened on SSR, node 10 on Elasticbeanstalk and locally (MacOS)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions