diff --git a/src/util/Logger.js b/src/util/Logger.js index 23b0b44fb6e..fbf1b707c39 100644 --- a/src/util/Logger.js +++ b/src/util/Logger.js @@ -13,7 +13,7 @@ function log(level, args) { // Only log statements in development mode or if // throwing an error through console.error - if (level === 'error') { + if (DEBUG || level === 'error') { window.console[level].apply(window.console, args); } } diff --git a/src/v2/client/updateAppState.ts b/src/v2/client/updateAppState.ts index 840631df443..4c8f98aa1cf 100644 --- a/src/v2/client/updateAppState.ts +++ b/src/v2/client/updateAppState.ts @@ -5,6 +5,7 @@ import { interactionCodeFlow } from './interactionCodeFlow'; import { FORMS } from "../ion/RemediationConstants"; import transformIdxResponse from '../ion/transformIdxResponse'; + export async function updateAppState(appState: AppState, idxResponse: IdxResponse): Promise { const settings = appState.settings; diff --git a/src/v2/controllers/FormController.ts b/src/v2/controllers/FormController.ts index b8d6d4cddb7..06453d30232 100644 --- a/src/v2/controllers/FormController.ts +++ b/src/v2/controllers/FormController.ts @@ -263,8 +263,7 @@ export default Controller.extend({ // Error out when this is not a remediation form. Unexpected Exception. if (!this.options.appState.hasRemediationObject(formName)) { - const error = `Cannot find http action for "${formName}".`; - this.options.settings.callGlobalError(error); + this.options.settings.callGlobalError(`Cannot find http action for "${formName}".`); await this.showFormErrors(this.formView.model, 'Cannot find action to proceed.', this.formView.form); return; } diff --git a/webpack.common.config.js b/webpack.common.config.js index 0c856d9c62b..827320bfd1d 100644 --- a/webpack.common.config.js +++ b/webpack.common.config.js @@ -44,7 +44,7 @@ module.exports = function({ }; - if (mode === 'production' || true) { + if (mode === 'production') { // preset-env must run before preset-typescript https://github.com/babel/babel/issues/12066 babelOptions.presets.unshift('@babel/preset-env'); } else { @@ -114,6 +114,7 @@ module.exports = function({ ].some(filePathContains); return shallBeExcluded && !npmRequiresTransform; + }, loader: 'babel-loader', options: babelOptions