From d2c773196f14e2f6041dc6d8443c5362b516b421 Mon Sep 17 00:00:00 2001 From: Erik Ziegler Date: Sun, 30 Jun 2019 15:28:15 +0200 Subject: [PATCH] @ohif-i18n 0.2.1: Prevent crashing when window.config is undefined --- extensions/ohif-i18n/package.json | 2 +- extensions/ohif-i18n/src/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/ohif-i18n/package.json b/extensions/ohif-i18n/package.json index a7706b68b..813993a42 100644 --- a/extensions/ohif-i18n/package.json +++ b/extensions/ohif-i18n/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/i18n", - "version": "0.2.0", + "version": "0.2.1", "description": "OHIF extension for internationalization", "author": "OHIF", "license": "MIT", diff --git a/extensions/ohif-i18n/src/index.js b/extensions/ohif-i18n/src/index.js index d7660dff6..2a66e4e32 100755 --- a/extensions/ohif-i18n/src/index.js +++ b/extensions/ohif-i18n/src/index.js @@ -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,