@ohif-i18n 0.2.1: Prevent crashing when window.config is undefined
This commit is contained in:
1 parent
1b7625affd
commit
d2c773196f
2 files changed
+2
-2
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ohif/i18n",
|
"name": "@ohif/i18n",
|
||||||
"version": "0.2.0",
|
"version": "0.2.1",
|
||||||
"description": "OHIF extension for internationalization",
|
"description": "OHIF extension for internationalization",
|
||||||
"author": "OHIF",
|
"author": "OHIF",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ function addLocales(newLocales) {
|
|||||||
|
|
||||||
// Note: Developers can add the API key to use the in-context editor.
|
// Note: Developers can add the API key to use the in-context editor.
|
||||||
// DO NOT commit the API key
|
// DO NOT commit the API key
|
||||||
const config = window.config.i18n || {};
|
const config = (window.config && window.config.i18n) || {};
|
||||||
|
|
||||||
const locizeOptions = {
|
const locizeOptions = {
|
||||||
projectId: config.LOCIZE_PROJECTID,
|
projectId: config.LOCIZE_PROJECTID,
|
||||||
|
|||||||
Reference in new issue
Block a user