Skip to content

Commit f92bcad

Browse files
committed
Fix error when running link test cases on JSDOM
1 parent 7f152e3 commit f92bcad

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

dist/html-to-draftjs.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "html-to-draftjs",
3-
"version": "0.1.0-beta15",
3+
"version": "0.1.0-beta.16",
44
"main": "dist/html-to-draftjs.js",
55
"repository": {
66
"type": "git",

src/library/getEntityId.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const getEntityId = (node) => {
66
node instanceof HTMLAnchorElement
77
) {
88
const entityConfig = {};
9-
if (node.dataset.mention !== undefined) {
9+
if (node.dataset && node.dataset.mention !== undefined) {
1010
entityConfig.url = node.href;
1111
entityConfig.text = node.innerHTML;
1212
entityConfig.value = node.dataset.value;

0 commit comments

Comments
 (0)