summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-core/src/reducers/config.js
blob: a49c602cf48869f1beffa319a40521c5e42f0fef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
const { fromJS } = require('immutable');
const ACTION_TYPES = require('../actions/TYPES');

module.exports = (state, action) => {
    state = fromJS(state);
    switch (action.type) {

    case ACTION_TYPES.PAGE_FETCH_END:
        return fromJS(action.payload.config);

    default:
        return state;

    }
};