@adminforth/i18n
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -401,2 +401,5 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
} | ||
if (!key) { | ||
throw new Error(`Faced an empty key in Fronted messages, file ${file}`); | ||
} | ||
const record = Object.assign({ [this.enFieldName]: key, [this.options.categoryFieldName]: category }, (this.options.sourceFieldName ? { [this.options.sourceFieldName]: file } : {})); | ||
@@ -476,2 +479,5 @@ try { | ||
if (!translation) { | ||
if (!msg) { | ||
throw Error(`Empty string passed to tr function during translation`); | ||
} | ||
yield resource.create({ | ||
@@ -478,0 +484,0 @@ [this.enFieldName]: msg, |
@@ -478,2 +478,5 @@ import AdminForth, { AdminForthPlugin, Filters, suggestIfTypo, AdminForthDataTypes } from "adminforth"; | ||
} | ||
if (!key) { | ||
throw new Error(`Faced an empty key in Fronted messages, file ${file}`); | ||
} | ||
const record = { | ||
@@ -564,2 +567,6 @@ [this.enFieldName]: key, | ||
if (!translation) { | ||
if (!msg) { | ||
throw Error(`Empty string passed to tr function during translation`); | ||
} | ||
await resource.create({ | ||
@@ -566,0 +573,0 @@ [this.enFieldName]: msg, |
{ | ||
"name": "@adminforth/i18n", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
5463946
4982
1