@ohif-i18n 0.2.1: Prevent crashing when window.config is undefined

This commit is contained in:
Erik Ziegler 2019-06-30 15:28:15 +02:00
parent 1b7625affd
commit d2c773196f
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@ohif/i18n",
"version": "0.2.0",
"version": "0.2.1",
"description": "OHIF extension for internationalization",
"author": "OHIF",
"license": "MIT",

View File

@ -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,