Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

Commit aaefe6f

Browse files
author
Max Stoiber
committed
Fix rendering messages
1 parent c2ba637 commit aaefe6f

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

shared/clients/draft-js/links-decorator/core.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,15 @@ const createLinksDecorator = (
2929
) => {
3030
if (contentBlock.type === 'code-block') return;
3131

32-
contentBlock.findEntityRanges(char => {
33-
const entityKey = char.getEntity();
34-
return (
35-
entityKey !== null &&
36-
contentState.getEntity(entityKey).getType() === 'LINK'
37-
);
38-
}, callback);
32+
if (contentBlock.findEntityRanges) {
33+
contentBlock.findEntityRanges(char => {
34+
const entityKey = char.getEntity();
35+
return (
36+
entityKey !== null &&
37+
contentState.getEntity(entityKey).getType() === 'LINK'
38+
);
39+
}, callback);
40+
}
3941
linkStrategy(contentBlock, callback);
4042
},
4143
component: ({

0 commit comments

Comments
 (0)