Remove unused strategy API from Draftail registry

This commit is contained in:
Thibaud Colas 2018-02-02 17:29:54 +02:00 committed by Matt Westcott
parent 278e5e8e3c
commit d77f8681e0
2 changed files with 0 additions and 10 deletions

View file

@ -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),
})

View file

@ -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,
};