next-translate 2.0.4 → 2.0.5

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.
@@ -69,8 +69,13 @@ function transCore(_a) {
69
69
  return t(firstFallback, query, __assign(__assign({}, options), { fallback: restFallbacks }));
70
70
  }
71
71
  }
72
- if (empty && (options === null || options === void 0 ? void 0 : options.default) && !(fallbacks === null || fallbacks === void 0 ? void 0 : fallbacks.length)) {
73
- return interpolateUnknown(options.default, query);
72
+ if (empty &&
73
+ options &&
74
+ options.hasOwnProperty('default') &&
75
+ !(fallbacks === null || fallbacks === void 0 ? void 0 : fallbacks.length)) {
76
+ return options.default
77
+ ? interpolateUnknown(options.default, query)
78
+ : options.default;
74
79
  }
75
80
  if (empty) {
76
81
  return k;
@@ -67,8 +67,13 @@ export default function transCore(_a) {
67
67
  return t(firstFallback, query, __assign(__assign({}, options), { fallback: restFallbacks }));
68
68
  }
69
69
  }
70
- if (empty && (options === null || options === void 0 ? void 0 : options.default) && !(fallbacks === null || fallbacks === void 0 ? void 0 : fallbacks.length)) {
71
- return interpolateUnknown(options.default, query);
70
+ if (empty &&
71
+ options &&
72
+ options.hasOwnProperty('default') &&
73
+ !(fallbacks === null || fallbacks === void 0 ? void 0 : fallbacks.length)) {
74
+ return options.default
75
+ ? interpolateUnknown(options.default, query)
76
+ : options.default;
72
77
  }
73
78
  if (empty) {
74
79
  return k;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-translate",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "description": "Tiny and powerful i18n tools (Next plugin + API) to translate your Next.js pages.",
5
5
  "license": "MIT",
6
6
  "keywords": [