Stackedit/src/store/syncedContent.js

13 lines
344 B
JavaScript
Raw Normal View History

2017-08-25 10:37:46 +00:00
import moduleTemplate from './moduleTemplate';
import empty from '../data/emptySyncedContent';
2017-08-25 10:37:46 +00:00
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;