draft-js-multidecorators
draft-js-multidecorators copied to clipboard
add missing param `contentState`
const strategy = (contentBlock, cb, contentState) => {
if (!contentState) return;
contentBlock.findEntityRanges(character => {
const entityKey = character.getEntity();
if (!entityKey) return false
const entityType = contentState.getEntity(entityKey).getType()
return entityType === 'LINK_SPAN'
}, cb);
}
for strategy mode, contentState could be a conditional expression.
if contentState is missing on upstream, it could be always null