Skip to content

Commit

Permalink
Fix environment config
Browse files Browse the repository at this point in the history
  • Loading branch information
testower committed Dec 27, 2023
1 parent 23431cd commit 246cc5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/config/readConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ See the Licence for the specific language governing permissions and
limitations under the Licence. */

import { getEnvironment } from "./getEnvironment";
const globalConfig = require("./global.json");
import globalConfig from "./global.json";

var configreader = {};

configreader.readConfig = (callback) => {
const fetchEnvConfig = async () => {
const env = getEnvironment();
const { default: config } = await import(`./environments/${env}.json`);
const config = await import(`./environments/${env}.json`);
callback(Object.assign({}, globalConfig, config));
};
fetchEnvConfig();
Expand Down
2 changes: 1 addition & 1 deletion src/localization/localization.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const localization = async (locale) => {
const localStorageKey = "ABZU::settings::locale";
const preferredLocale =
locale || localStorage.getItem(localStorageKey) || "en";
const { default: messages } = await import(
const messages = await import(
`../static/lang/${preferredLocale}.json`
);
localStorage.setItem(localStorageKey, preferredLocale);
Expand Down

0 comments on commit 246cc5b

Please sign in to comment.