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 {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');
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue