mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-30 10:58:23 -05:00
Use log.error instead of console
This commit is contained in:
parent
b38a97adf3
commit
85172b78fa
1 changed files with 3 additions and 4 deletions
|
@ -6,6 +6,7 @@ import classNames from 'classnames';
|
|||
|
||||
import {selectIsAdmin} from '../../redux/session.js';
|
||||
import {selectStudioId} from '../../redux/studio.js';
|
||||
import log from '../../lib/log';
|
||||
|
||||
import AdminPanel from '../../components/adminpanel/adminpanel.jsx';
|
||||
|
||||
|
@ -21,15 +22,13 @@ const storeAdminPanelOpen = value => {
|
|||
try {
|
||||
localStorage.setItem(adminPanelOpenKey, value ? 'open' : 'closed');
|
||||
} catch (e) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error('Could not set adminPanelToggled_studios in local storage', e);
|
||||
log.error('Could not set adminPanelToggled_studios in local storage', e);
|
||||
}
|
||||
try {
|
||||
document.querySelector('#view').classList
|
||||
.toggle(adminPanelOpenClass, value);
|
||||
} catch (e) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error('Could not set admin-panel-open class on #view');
|
||||
log.error('Could not set admin-panel-open class on #view');
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue