Skip to content

Commit 25c0ff7

Browse files
committed
Hick to remove draftjs warnings when using Entity mathods
1 parent c06abda commit 25c0ff7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/library/getEntityId.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const getEntityId = (node) => {
1010
entityConfig.url = node.href;
1111
entityConfig.text = node.innerHTML;
1212
entityConfig.value = node.dataset.value;
13-
entityId = Entity.create(
13+
entityId = Entity.__create(
1414
'MENTION',
1515
'IMMUTABLE',
1616
entityConfig,
@@ -19,7 +19,7 @@ const getEntityId = (node) => {
1919
entityConfig.url = node.href;
2020
entityConfig.title = node.innerHTML;
2121
entityConfig.target = node.target;
22-
entityId = Entity.create(
22+
entityId = Entity.__create(
2323
'LINK',
2424
'MUTABLE',
2525
entityConfig,

src/library/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function genFragment(
4848
entityConfig.alt = node.alt;
4949
entityConfig.height = node.style.height;
5050
entityConfig.width = node.style.width;
51-
const entityId = Entity.create(
51+
const entityId = Entity.__create(
5252
'IMAGE',
5353
'MUTABLE',
5454
entityConfig,
@@ -64,7 +64,7 @@ function genFragment(
6464
entityConfig.src = node.src;
6565
entityConfig.height = node.height;
6666
entityConfig.width = node.width;
67-
const entityId = Entity.create(
67+
const entityId = Entity.__create(
6868
'EMBEDDED_LINK',
6969
'MUTABLE',
7070
entityConfig,
@@ -137,7 +137,7 @@ export default function htmlToDraft(html: string): Object {
137137
let entityMap = new OrderedMap({});
138138
chunk.entities && chunk.entities.forEach(entity => {
139139
if (entity) {
140-
entityMap = entityMap.set(entity, Entity.get(entity));
140+
entityMap = entityMap.set(entity, Entity.__get(entity));
141141
}
142142
});
143143
let start = 0;

0 commit comments

Comments
 (0)