diff --git a/CHANGELOG.md b/CHANGELOG.md index bb484427b..7284f3e22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ * Use cookies and RTR instead of directly handling the JWT. Refs STCOR-671, FOLIO-3627. * Shrink the token lifespan so we are less likely to use an expired one. Refs STCOR-754. * Correctly evaluate token lifespan; use consistent protocol for service worker messages. Refs STCOR-756. +* Allow console to be preserved on logout. STCOR-761. * Do not catch and reject non-okapi request errors. Refs STCOR-759, UILDP-129. ## [10.0.0](https://github.com/folio-org/stripes-core/tree/v10.0.0) (2023-10-11) diff --git a/src/components/MainNav/MainNav.js b/src/components/MainNav/MainNav.js index e8b7ef569..d1b7a6e07 100644 --- a/src/components/MainNav/MainNav.js +++ b/src/components/MainNav/MainNav.js @@ -5,7 +5,7 @@ import { compose } from 'redux'; import { injectIntl } from 'react-intl'; import { withRouter } from 'react-router'; -import { branding } from 'stripes-config'; +import { branding, config } from 'stripes-config'; import { Icon } from '@folio/stripes-components'; @@ -126,7 +126,9 @@ class MainNav extends Component { // return the user to the login screen, but after logging in they will be brought to the default screen. logout() { - console.clear(); // eslint-disable-line no-console + if (!config.preserveConsole) { + console.clear(); // eslint-disable-line no-console + } this.returnToLogin().then(() => { this.props.history.push('/'); });