Use log.error instead of console

This commit is contained in:
Paul Kaplan 2021-05-20 09:32:31 -04:00
parent b38a97adf3
commit 85172b78fa

View file

@ -6,6 +6,7 @@ import classNames from 'classnames';
import {selectIsAdmin} from '../../redux/session.js'; import {selectIsAdmin} from '../../redux/session.js';
import {selectStudioId} from '../../redux/studio.js'; import {selectStudioId} from '../../redux/studio.js';
import log from '../../lib/log';
import AdminPanel from '../../components/adminpanel/adminpanel.jsx'; import AdminPanel from '../../components/adminpanel/adminpanel.jsx';
@ -21,15 +22,13 @@ const storeAdminPanelOpen = value => {
try { try {
localStorage.setItem(adminPanelOpenKey, value ? 'open' : 'closed'); localStorage.setItem(adminPanelOpenKey, value ? 'open' : 'closed');
} catch (e) { } catch (e) {
// eslint-disable-next-line no-console log.error('Could not set adminPanelToggled_studios in local storage', e);
console.error('Could not set adminPanelToggled_studios in local storage', e);
} }
try { try {
document.querySelector('#view').classList document.querySelector('#view').classList
.toggle(adminPanelOpenClass, value); .toggle(adminPanelOpenClass, value);
} catch (e) { } catch (e) {
// eslint-disable-next-line no-console log.error('Could not set admin-panel-open class on #view');
console.error('Could not set admin-panel-open class on #view');
} }
}; };