Skip to content

Commit c8c5557

Browse files
committed
Fixing issue of exception when passded html string is null
1 parent 9670f1f commit c8c5557

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/library/chunkBuilder.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ const getEmptyChunk = (): Object => {
4141
text: '',
4242
inlines: [],
4343
entities: [],
44-
blocks: [],
44+
blocks: [{
45+
type: 'unstyled',
46+
depth: 0,
47+
data: new Map({}),
48+
}],
4549
};
4650
};
4751

src/library/getEntityId.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const getEntityId = (node) => {
1818
} else {
1919
entityConfig.url = node.href;
2020
entityConfig.title = node.innerHTML;
21-
entityConfig.className = node.className;
2221
entityConfig.target = node.target;
2322
entityId = Entity.create(
2423
'LINK',

0 commit comments

Comments
 (0)