fix: 🐛 Fix for JS breaking on header (#1164)
This commit is contained in:
parent
a2a7e05e7d
commit
0fbaf95971
@ -3,11 +3,14 @@ import { connect } from 'react-redux';
|
|||||||
import { hotkeysManager } from '../App.js';
|
import { hotkeysManager } from '../App.js';
|
||||||
|
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = state => {
|
||||||
const hotkeyDefinitions =
|
const { hotkeyDefinitions = [] } = state.preferences || {};
|
||||||
state.preferences.hotkeyDefinitions.length > 0
|
|
||||||
? state.preferences.hotkeyDefinitions
|
const _hotkeyDefinitions =
|
||||||
|
hotkeyDefinitions.length > 0
|
||||||
|
? hotkeyDefinitions
|
||||||
: hotkeysManager.hotkeyDefaults;
|
: hotkeysManager.hotkeyDefaults;
|
||||||
hotkeysManager.setHotkeys(hotkeyDefinitions);
|
|
||||||
|
hotkeysManager.setHotkeys(_hotkeyDefinitions);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
user: state.oidc && state.oidc.user,
|
user: state.oidc && state.oidc.user,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user