Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

withNamespace([])(Component).WrappedComponent is undefined #668

Closed
jpolo opened this issue Jan 9, 2019 · 2 comments
Closed

withNamespace([])(Component).WrappedComponent is undefined #668

jpolo opened this issue Jan 9, 2019 · 2 comments

Comments

@jpolo
Copy link

jpolo commented Jan 9, 2019

Describe the bug
withNamespace([])(Component).WrappedComponent is undefined.

It seems also all other statics are not present (using Object.keys() on the result).

Occurs in react-i18next version
v9.0.2

To Reproduce

  1. Create a new component using the decorator withNamespaces()
  2. Try to access any static property

Expected behaviour
When I read the decorator code there is this code :

LoadNamespaceWithContext.WrappedComponent = WrappedComponent;
LoadNamespaceWithContext.displayName = `LoadNamespace(${getDisplayName(WrappedComponent)})`;
LoadNamespaceWithContext.namespaces = namespaceArg;

So the WrappedComponent was intended to be accesible but is not.

Screenshots
N/A

OS (please complete the following information):
N/A

Additional context
N/A

@jamuhl
Copy link
Member

jamuhl commented Jan 9, 2019

strange this tests don't fail https://github.com/i18next/react-i18next/blob/master/test/withNamespaces.spec.js#L12 which actually assert this

@jamuhl
Copy link
Member

jamuhl commented Jan 18, 2019

closing for now...feel free to reopen...for now i guess it's a local problem

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

No branches or pull requests

2 participants