tolgee / tolgee-js

Tolgee JavaScript libraries monorepo
https://tolgee.io
MIT License
218 stars 24 forks source link

Make `defaultNamespace` and `ns` better working together #3336

Open stepan662 opened 2 weeks ago

stepan662 commented 2 weeks ago

When using namespaces, defaultNamespace stays '' when not set explicitly and then this namespace is required on initial startup, so unnecessary request is made on client or in SSR mode this can cause tolgee thinking it needs this namespace and therefore not rendering the conent, making SSR essentialy non-working.

Could be solved by assigning defaultNamespace to the first namespace in ns or by only taking ns as required and logging warning when defaultNamespace is not in ns.