@vocab/react
Advanced tools
Comparing version 1.0.0 to 1.0.1
# @vocab/react | ||
## 1.0.1 | ||
### Patch Changes | ||
- [`c9a38dd`](https://github.com/seek-oss/vocab/commit/c9a38dd15e2c2a47fc4d5eb2348fdd08a6982768) [#54](https://github.com/seek-oss/vocab/pull/54) Thanks [@jahredhope](https://github.com/jahredhope)! - Allow special characters within translation keys and messages | ||
* [`c9a38dd`](https://github.com/seek-oss/vocab/commit/c9a38dd15e2c2a47fc4d5eb2348fdd08a6982768) [#54](https://github.com/seek-oss/vocab/pull/54) Thanks [@jahredhope](https://github.com/jahredhope)! - Add a warning when accessing a key that doesn't exist | ||
## 1.0.0 | ||
@@ -4,0 +12,0 @@ |
@@ -63,3 +63,5 @@ 'use strict'; | ||
if (!(translationsObject !== null && translationsObject !== void 0 && translationsObject[key])) { | ||
return null; | ||
// eslint-disable-next-line no-console | ||
console.error(`Unable to find translation for key "${key}". Possible keys are ${Object.keys(translationsObject).map(v => `"${v}"`).join(', ')}`); | ||
return ''; | ||
} | ||
@@ -66,0 +68,0 @@ |
@@ -63,3 +63,5 @@ 'use strict'; | ||
if (!(translationsObject !== null && translationsObject !== void 0 && translationsObject[key])) { | ||
return null; | ||
// eslint-disable-next-line no-console | ||
console.error(`Unable to find translation for key "${key}". Possible keys are ${Object.keys(translationsObject).map(v => `"${v}"`).join(', ')}`); | ||
return ''; | ||
} | ||
@@ -66,0 +68,0 @@ |
@@ -55,3 +55,5 @@ import React, { useMemo, useContext, useReducer } from 'react'; | ||
if (!(translationsObject !== null && translationsObject !== void 0 && translationsObject[key])) { | ||
return null; | ||
// eslint-disable-next-line no-console | ||
console.error(`Unable to find translation for key "${key}". Possible keys are ${Object.keys(translationsObject).map(v => `"${v}"`).join(', ')}`); | ||
return ''; | ||
} | ||
@@ -58,0 +60,0 @@ |
{ | ||
"name": "@vocab/react", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "dist/vocab-react.cjs.js", | ||
@@ -5,0 +5,0 @@ "module": "dist/vocab-react.esm.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28476
338