diff --git a/server/zanata-frontend/src/frontend/app/editor/actions/glossary-action-types.js b/server/zanata-frontend/src/frontend/app/editor/actions/glossary-action-types.js index 9e13433ec9..c90325e92f 100644 --- a/server/zanata-frontend/src/frontend/app/editor/actions/glossary-action-types.js +++ b/server/zanata-frontend/src/frontend/app/editor/actions/glossary-action-types.js @@ -11,7 +11,7 @@ export const GLOSSARY_TERMS_FAILURE = 'GLOSSARY_TERMS_FAILURE' /* Indicates the index in glossary results that should have details displayed */ export const SET_GLOSSARY_DETAILS_INDEX = 'SET_GLOSSARY_DETAILS_INDEX' /* Set whether glossary details modal is showing */ -export const SHOW_GLOSSARY_DETAILS = Symbol('SHOW_GLOSSARY_DETAILS') +export const SHOW_GLOSSARY_DETAILS = 'SHOW_GLOSSARY_DETAILS' /* API request for glossary details has started. */ export const GLOSSARY_DETAILS_REQUEST = Symbol('GLOSSARY_DETAILS_REQUEST') diff --git a/server/zanata-frontend/src/frontend/app/editor/actions/glossary-actions.js b/server/zanata-frontend/src/frontend/app/editor/actions/glossary-actions.js index dc0a48f003..7e510d2162 100644 --- a/server/zanata-frontend/src/frontend/app/editor/actions/glossary-actions.js +++ b/server/zanata-frontend/src/frontend/app/editor/actions/glossary-actions.js @@ -105,13 +105,7 @@ function findGlossaryTerms (searchText) { } const setGlossaryDetailsIndex = createAction(SET_GLOSSARY_DETAILS_INDEX) - -export function showGlossaryDetails (show) { - return { - type: SHOW_GLOSSARY_DETAILS, - payload: { show } - } -} +export const showGlossaryDetails = createAction(SHOW_GLOSSARY_DETAILS) /** * Show the glossary details modal and fetch details from the API. diff --git a/server/zanata-frontend/src/frontend/app/editor/reducers/glossary-reducer.js b/server/zanata-frontend/src/frontend/app/editor/reducers/glossary-reducer.js index da7df88bb7..bc50e50a37 100644 --- a/server/zanata-frontend/src/frontend/app/editor/reducers/glossary-reducer.js +++ b/server/zanata-frontend/src/frontend/app/editor/reducers/glossary-reducer.js @@ -111,7 +111,7 @@ const glossary = (state = defaultState, action) => { case SHOW_GLOSSARY_DETAILS: return update({ details: { - show: {$set: action.payload.show} + show: {$set: action.payload} } }) diff --git a/server/zanata-frontend/src/frontend/app/editor/reducers/glossary-reducer.test.js b/server/zanata-frontend/src/frontend/app/editor/reducers/glossary-reducer.test.js index 726ad5a420..fe94aa5903 100644 --- a/server/zanata-frontend/src/frontend/app/editor/reducers/glossary-reducer.test.js +++ b/server/zanata-frontend/src/frontend/app/editor/reducers/glossary-reducer.test.js @@ -206,11 +206,11 @@ describe('glossary-reducer test', () => { const initial = glossaryReducer(undefined, { type: 'any' }) const shown = glossaryReducer(initial, { type: SHOW_GLOSSARY_DETAILS, - payload: { show: true } + payload: true }) const hidden = glossaryReducer(shown, { type: SHOW_GLOSSARY_DETAILS, - payload: { show: false } + payload: false }) expect(initial.details.show).toEqual(false) expect(shown.details.show).toEqual(true)