Remove unused strategy API from Draftail registry

pull/4261/head
Thibaud Colas 2018-02-02 17:29:54 +02:00 zatwierdzone przez Matt Westcott
rodzic 5b2c04411b
commit 37316656f7
2 zmienionych plików z 0 dodań i 10 usunięć

Wyświetl plik

@ -51,7 +51,6 @@ export const initEditor = (fieldName, options = {}) => {
entityTypes = options.entityTypes.map(wrapWagtailIcon).map(type =>
Object.assign(type, {
source: registry.getSource(type.source),
strategy: registry.getStrategy(type.type) || null,
decorator: registry.getDecorator(type.decorator),
block: registry.getBlock(type.block),
})

Wyświetl plik

@ -2,7 +2,6 @@ const registry = {
decorators: {},
blocks: {},
sources: {},
strategies: {},
};
const registerDecorators = (decorators) => {
@ -23,12 +22,6 @@ const registerSources = (sources) => {
const getSource = name => registry.sources[name];
const registerStrategies = (strategies) => {
Object.assign(registry.strategies, strategies);
};
const getStrategy = name => registry.strategies[name];
export default {
registerDecorators,
getDecorator,
@ -36,6 +29,4 @@ export default {
getBlock,
registerSources,
getSource,
registerStrategies,
getStrategy,
};