Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
fix unit tests without breaking the build
Browse files Browse the repository at this point in the history
  • Loading branch information
bwindels committed Feb 20, 2019
1 parent 6bf8269 commit 44bedb2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/languageHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,9 @@ export function getCurrentLanguage() {
function getLangsJson() {
return new Promise((resolve, reject) => {
// LANGUAGES_FILE is a webpack compile-time define, see webpack config
const url = (typeof LANGUAGES_FILE === "string") ? require(LANGUAGES_FILE) : (i18nFolder + 'languages.json');
request(
{ method: "GET", url: require(LANGUAGES_FILE) },
{ method: "GET", url },
(err, response, body) => {
if (err || response.status < 200 || response.status >= 300) {
reject({err: err, response: response});
Expand Down

0 comments on commit 44bedb2

Please sign in to comment.