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