Reflect API change for getting an Entity

This commit is contained in:
Luke Barnard 2017-08-03 11:29:26 +01:00
parent 124795006c
commit fb5dc295aa
2 changed files with 21 additions and 17 deletions

View file

@ -238,7 +238,7 @@ export function attachImmutableEntitiesToEmoji(editorState: EditorState): Editor
const existingEntityKey = block.getEntityAt(start);
if (existingEntityKey) {
// avoid manipulation in case the emoji already has an entity
const entity = Entity.get(existingEntityKey);
const entity = newContentState.getEntity(existingEntityKey);
if (entity && entity.get('type') === 'emoji') {
return;
}