@digitaldefiance/i18n-lib 1.0.29 → 1.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/i18n-engine.js +4 -4
- package/package.json +1 -1
package/dist/i18n-engine.js
CHANGED
|
@@ -120,10 +120,10 @@ class I18nEngine {
|
|
|
120
120
|
: stringValue;
|
|
121
121
|
}
|
|
122
122
|
catch {
|
|
123
|
-
return key;
|
|
123
|
+
return String(key);
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
return key;
|
|
126
|
+
return String(key);
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
/**
|
|
@@ -157,14 +157,14 @@ class I18nEngine {
|
|
|
157
157
|
const lang = language ?? this.config.defaultLanguage;
|
|
158
158
|
const strings = this.config.strings[lang];
|
|
159
159
|
if (!strings?.[key])
|
|
160
|
-
return key;
|
|
160
|
+
return String(key);
|
|
161
161
|
const stringValue = strings[key];
|
|
162
162
|
return (0, utils_1.isTemplate)(key)
|
|
163
163
|
? (0, utils_1.replaceVariables)(stringValue, vars, this.config.constants)
|
|
164
164
|
: stringValue;
|
|
165
165
|
}
|
|
166
166
|
catch {
|
|
167
|
-
return key;
|
|
167
|
+
return String(key);
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
/**
|