fix: node type check

This commit is contained in:
zerosoul
2022-04-02 17:14:20 +08:00
parent 0dd03de9aa
commit 4525ae08d0
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ export default function MrakdownRender({ content }) {
console.log(evt);
const { target } = evt;
// 图片
if (target.nodeType == 1) {
if (target.nodeName == "IMG") {
const data = { originUrl: target.dataset.origin || target.src };
setPreviewImage(data);
}