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';
|
||||
|
||||
const mapStateToProps = state => {
|
||||
const hotkeyDefinitions =
|
||||
state.preferences.hotkeyDefinitions.length > 0
|
||||
? state.preferences.hotkeyDefinitions
|
||||
const { hotkeyDefinitions = [] } = state.preferences || {};
|
||||
|
||||
const _hotkeyDefinitions =
|
||||
hotkeyDefinitions.length > 0
|
||||
? hotkeyDefinitions
|
||||
: hotkeysManager.hotkeyDefaults;
|
||||
hotkeysManager.setHotkeys(hotkeyDefinitions);
|
||||
|
||||
hotkeysManager.setHotkeys(_hotkeyDefinitions);
|
||||
|
||||
return {
|
||||
user: state.oidc && state.oidc.user,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user