Fix lint errors

This commit is contained in:
Labhansh Agrawal 2019-11-20 18:57:56 +05:30 committed by Benjamin Staneck
parent 943999f431
commit f0b92cb8be
2 changed files with 6 additions and 7 deletions

View file

@ -432,7 +432,8 @@ const reducer = (state = initial, action: any) => {
if ( if (
typeof state.cols !== 'undefined' && typeof state.cols !== 'undefined' &&
state.cols !== null && state.cols !== null &&
(typeof state.rows !== 'undefined' && state.rows !== null) && typeof state.rows !== 'undefined' &&
state.rows !== null &&
(state.rows !== state_.rows || state.cols !== state_.cols) (state.rows !== state_.rows || state.cols !== state_.cols)
) { ) {
state_ = state_.merge({notifications: {resize: true}}, {deep: true}); state_ = state_.merge({notifications: {resize: true}}, {deep: true});

View file

@ -2,12 +2,10 @@ import {createSelector} from 'reselect';
import {HyperState} from './hyper'; import {HyperState} from './hyper';
const getTermGroups = ({termGroups}: Pick<HyperState, 'termGroups'>) => termGroups.termGroups; const getTermGroups = ({termGroups}: Pick<HyperState, 'termGroups'>) => termGroups.termGroups;
const getRootGroups = createSelector( const getRootGroups = createSelector(getTermGroups, termGroups =>
getTermGroups, Object.keys(termGroups)
termGroups => .map(uid => termGroups[uid])
Object.keys(termGroups) .filter(({parentUid}) => !parentUid)
.map(uid => termGroups[uid])
.filter(({parentUid}) => !parentUid)
); );
export default getRootGroups; export default getRootGroups;