14 lines
316 B
JavaScript
14 lines
316 B
JavaScript
import { getFileEditorOrDefault } from './utils';
|
|
|
|
export const activeFileEditor = (state, getters, rootState, rootGetters) => {
|
|
const { activeFile } = rootGetters;
|
|
|
|
if (!activeFile) {
|
|
return null;
|
|
}
|
|
|
|
const { path } = rootGetters.activeFile;
|
|
|
|
return getFileEditorOrDefault(state.fileEditors, path);
|
|
};
|