Skip to content

Commit

Permalink
fix crash in gatsby
Browse files Browse the repository at this point in the history
  • Loading branch information
adrai committed Jan 7, 2023
1 parent 799701d commit 5774599
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 12.1.4

- fix crash in gatsby [1594](https://github.com/i18next/react-i18next/issues/1594)

### 12.1.3

- fix fallback of t function in Trans component
Expand Down
2 changes: 1 addition & 1 deletion react-i18next.js
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@
values: values,
defaults: defaults,
components: components,
ns: ns || t.ns || defaultNSFromContext || i18n && i18n.options && i18n.options.defaultNS,
ns: ns || t && t.ns || defaultNSFromContext || i18n && i18n.options && i18n.options.defaultNS,
i18n: i18n,
t: tFromProps,
shouldUnescape: shouldUnescape
Expand Down
2 changes: 1 addition & 1 deletion react-i18next.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/Trans.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ export function Trans({
defaults,
components,
// prepare having a namespace
ns: ns || t.ns || defaultNSFromContext || (i18n && i18n.options && i18n.options.defaultNS),
ns:
ns || (t && t.ns) || defaultNSFromContext || (i18n && i18n.options && i18n.options.defaultNS),
i18n,
t: tFromProps,
shouldUnescape,
Expand Down

0 comments on commit 5774599

Please sign in to comment.