Skip to content

Commit

Permalink
fix: prevent t() from returning null
Browse files Browse the repository at this point in the history
  • Loading branch information
mohitb35 committed Mar 17, 2023
1 parent 53acc33 commit 1eb5fbd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions i18next.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import "i18next";

declare module "i18next" {
interface CustomTypeOptions {
returnNull: false;
}
}
1 change: 1 addition & 0 deletions next-i18next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ module.exports = {
typeof window === "undefined"
? require("path").resolve("./public/locales")
: "/public/locales",
returnNull: false,
};

0 comments on commit 1eb5fbd

Please sign in to comment.