Stackedit/src/store/modules/syncedContent.js

13 lines
347 B
JavaScript
Raw Normal View History

2017-08-25 10:37:46 +00:00
import moduleTemplate from './moduleTemplate';
import empty from '../../data/emptySyncedContent';
const module = moduleTemplate(empty, true);
module.getters = {
...module.getters,
current: (state, getters, rootState, rootGetters) =>
state.itemMap[`${rootGetters['file/current'].id}/syncedContent`] || empty(),
};
export default module;