1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-03 23:50:33 +02:00
Files
joplin/packages/lib/services/plugins/utils/getShownPluginEditorView.ts

11 lines
424 B
TypeScript
Raw Normal View History

import { PluginStates } from '../reducer';
import getActivePluginEditorView from './getActivePluginEditorView';
export default (plugins: PluginStates, shownEditorViewIds: string[]) => {
const { editorPlugin, editorView } = getActivePluginEditorView(plugins);
if (editorView) {
if (!shownEditorViewIds.includes(editorView.id)) return { editorPlugin: null, editorView: null };
}
return { editorPlugin, editorView };
};