diff --git a/lib/reducers/term-groups.js b/lib/reducers/term-groups.js index a8bef8182edd..1ccf27e61177 100644 --- a/lib/reducers/term-groups.js +++ b/lib/reducers/term-groups.js @@ -5,6 +5,7 @@ import { SESSION_ADD, SESSION_SET_ACTIVE } from '../constants/sessions'; import { findBySession } from '../utils/term-groups'; import { decorateTermGroupsReducer } from '../utils/plugins'; +const MIN_SIZE = 0.05; const initialState = Immutable({ termGroups: {}, activeSessions: {}, @@ -172,6 +173,8 @@ const removeGroup = (state, uid) => { }; const resizeGroup = (state, uid, sizes) => { + // Make sure none of the sizes fall below MIN_SIZE: + if (sizes.find(size => size < MIN_SIZE)) return state; return state.setIn( ['termGroups', uid, 'sizes'], sizes