Skip to content

Commit

Permalink
fix: 修复preview hover时报错的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
sunsonliu committed Nov 18, 2024
1 parent 9e276d0 commit 3553bb5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/toolbars/PreviewerBubble.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,9 @@ export default class PreviewerBubble {
}

$getClosestNode(node, targetNodeName) {
if (!node || !node.tagName) {
return false;
}
if (node.tagName === targetNodeName) {
return node;
}
Expand Down
3 changes: 3 additions & 0 deletions src/toolbars/Toc.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ export default class Toc {
}

$getClosestNode(node, targetNodeName) {
if (!node || !node.tagName) {
return false;
}
if (node.tagName === targetNodeName) {
return node;
}
Expand Down
3 changes: 3 additions & 0 deletions src/utils/tableContentHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,9 @@ export default class TableHandler {
}

$getClosestNode(node, targetNodeName) {
if (!node || !node.tagName) {
return false;
}
if (node.tagName === targetNodeName) {
return node;
}
Expand Down

0 comments on commit 3553bb5

Please sign in to comment.